I'll help you create a simple Roblox clicker game! Here's everything you need to know, step by step.
Step 1: Open Roblox Studio
First, open Roblox Studio and create a new baseplate game.
Step 2: Create the Clicker Object
- In the Explorer window (on the right), find "Workspace"
- Right-click on Workspace → Insert Object → Part
- Rename this part to "ClickerPart" (right-click → Rename)
- Move and resize it to look like a cookie or whatever you want
- You can add a decal to make it look like a cookie:
- Right-click ClickerPart → Insert Object → Decal
- In Properties, set the Texture to a cookie image ID
Step 3: Create the Main Script
- In Explorer, find "ServerScriptService"
- Right-click ServerScriptService → Insert Object → Script
- Rename it to "ClickerScript"
- Delete everything inside and paste this code:
-- Services
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
-- Create RemoteEvents
local remotes = Instance.new("Folder")
remotes.Name = "Remotes"
remotes.Parent = ReplicatedStorage
local clickRemote = Instance.new("RemoteEvent")
clickRemote.Name = "ClickRemote"
clickRemote.Parent = remotes
local rebirthRemote = Instance.new("RemoteEvent")
rebirthRemote.Name = "RebirthRemote"
rebirthRemote.Parent = remotes
-- Data storage
local playerData = {}
-- When player joins
Players.PlayerAdded:Connect(function(player)
-- Create leaderstats
local leaderstats = Instance.new("Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local clicks = Instance.new("IntValue")
clicks.Name = "Clicks"
clicks.Value = 0
clicks.Parent = leaderstats
local rebirths = Instance.new("IntValue")
rebirths.Name = "Rebirths"
rebirths.Value = 0
rebirths.Parent = leaderstats
-- Store player data
playerData[player] = {
clicks = 0,
rebirths = 0,
multiplier = 1
}
end)
-- When player clicks
clickRemote.OnServerEvent:Connect(function(player)
local data = playerData[player]
if data then
-- Add clicks based on multiplier
local clicksToAdd = 1 * data.multiplier
data.clicks = data.clicks + clicksToAdd
player.leaderstats.Clicks.Value = data.clicks
end
end)
-- When player rebirths
rebirthRemote.OnServerEvent:Connect(function(player)
local data = playerData[player]
if data and data.clicks >= 100 then -- Rebirth at 100 clicks
data.rebirths = data.rebirths + 1
data.clicks = 0
data.multiplier = data.multiplier + 1
player.leaderstats.Clicks.Value = 0
player.leaderstats.Rebirths.Value = data.rebirths
end
end)
-- Clean up when player leaves
Players.PlayerRemoving:Connect(function(player)
playerData[player] = nil
end)
Step 4: Create the Click Detection Script
- In Explorer, click on your "ClickerPart"
- Right-click ClickerPart → Insert Object → ClickDetector
- Right-click ClickerPart → Insert Object → Script
- Rename this script to "ClickScript"
- Delete everything inside and paste this code:
local clickDetector = script.Parent.ClickDetector
local remoteEvent = game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("ClickRemote")
clickDetector.MouseClick:Connect(function(player)
remoteEvent:FireServer()
end)
Step 5: Create the GUI
- In Explorer, find "StarterGui"
- Right-click StarterGui → Insert Object → ScreenGui
- Rename it to "ClickerGui"
- Right-click ClickerGui → Insert Object → TextButton
- Rename it to "RebirthButton"
- In Properties window:
- Set Text to "Rebirth (100 Clicks)"
- Set Position to {0.5, -100}, {0.9, -50}
- Set Size to {0, 200}, {0, 50}
- Set AnchorPoint to 0.5, 0.5
Step 6: Create the GUI Script
- Right-click the RebirthButton → Insert Object → LocalScript
- Delete everything inside and paste this code:
local button = script.Parent
local player = game.Players.LocalPlayer
local rebirthRemote = game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("RebirthRemote")
button.MouseButton1Click:Connect(function()
rebirthRemote:FireServer()
end)
-- Update button text
while true do
wait(0.1)
local clicks = player.leaderstats.Clicks.Value
local rebirths = player.leaderstats.Rebirths.Value
button.Text = "Rebirth (Need 100 Clicks) - Current: " .. clicks
end
Step 7: Test Your Game
- Click the "Play" button at the top of Roblox Studio
- Click on your cookie/part to gain clicks
- Watch your clicks go up in the leaderboard (top right)
- When you reach 100 clicks, click the Rebirth button
- Your clicks reset to 0, but now each click gives you 2 points!
Optional Improvements
To make your cookie/clicker look better:
- Select your ClickerPart
- In Properties, change:
- Shape to "Cylinder" for a cookie shape
- Material to "Neon" to make it glow
- BrickColor to whatever color you want
That's it! You now have a working clicker game. Each rebirth increases your click multiplier by 1, so after 1 rebirth you get 2 clicks per click, after 2 rebirths you get 3 clicks, and so on.