Having an issue when I tried to make a baseplate as a furnace and when the blocks touched it and points were added sometimes it would give me 2 points or 4 or 5 instead of just 1, adding debounce does not work cuz I don't want to add a wait to it. SpawnBlock is just a function that spawns a block when a player clicks a part in the world. TextChange is the main
IncreaseMoney:
local Player = game.Players.LocalPlayer
local TextLabel = script.Parent
local RS = game:GetService("ReplicatedStorage")
local TextChange = RS:WaitForChild("TextChange")
local Debounce = false
TextChange.OnClientEvent:Connect(function(Part)
Part:Destroy()
Player.leaderstats.Money.Value = Player.leaderstats.Money.Value + 1
end)
Detect ore spawn button being clicked:
local Player = game.Players.LocalPlayer
local RS = game:GetService("ReplicatedStorage")
local TextChange = RS:WaitForChild("TextChange")
local SpawnBlock = RS:WaitForChild("SpawnBlock")
local ClickDetector = game.Workspace.Button.ClickDetector
ClickDetector.MouseClick:Connect(function()
SpawnBlock:FireServer()
end)
Spawn block:
local RS = game:GetService("ReplicatedStorage")
local TextChange = RS:WaitForChild("TextChange")
local SpawnBlock = RS:WaitForChild("SpawnBlock")
SpawnBlock.OnServerEvent:Connect(function(Player)
local NewPart = Instance.new("Part",game.Workspace)
NewPart.Position = Vector3.new(0,50,0)
NewPart.Size = Vector3.new(2,2,2)
NewPart.BrickColor = BrickColor.new("Really blue")
NewPart.Material = "Neon"
end)
If ore touched furnace:
local Furnace = game.Workspace.Furnace
local RS = game:GetService("ReplicatedStorage")
local TextChange = RS:WaitForChild("TextChange")
Furnace.Touched:Connect(function(Hit)
if not Hit.Parent:FindFirstChild("Humanoid") then
local Part = Hit
TextChange:FireAllClients(Part)
end
end)

5 comments
http://idownvotedbecau.se/unclearquestion and there is too little code here, like what is SpawnBlock?
Are you increasing your money on the client? Seems like bad design, exploiters can just change the money value. :/
As if it was worth it LOL. It won't even replicate. It's not even bad because of that it's bad because it won't even replicate ^
Please be a bit more descriptive of what you want, explain it step by step please.
This is not my main project that's why it's both on client and server so I can change the values through command console.