(some locals)

local clicks = plr:WaitForChild("stat") -- stat im tryna change

SCRIPT 1


game.ReplicatedStorage.Remotes.McDonald.ClickBonus1.OnServerEvent:connect(function(plr, eggad)
	if plr:WaitForChild("Backpack"):WaitForChild("WhichToiletOn").Value < 1 then
		plr:Kick("Nice try, buddy :)")
	else
		clicks.Value = clicks.Value + 1
	end
end)

SCRIPT 2

game.ReplicatedStorage:WaitForChild("Remotes"):WaitForChild("McDonald"):WaitForChild("ClickBonus1"):FireServer(1)

Already changed the code a bit from a previous forum, (also please dont question the names). Anyway, so the error occurring is that the leaderstats will only go up in Studio and not the actual game, the game is FilteringEnabled and i'm trying to increase the stats through a remote event. Script 1 is located in a Server Script in the PlayerGui and script 2 is located in a local script also in the PlayerGui. I've picked out the important stuff that I think is causing the problem. If you could help that would be great, thanks ;D

1 comment

0

Make sure script 3 is a LocalScript. Also those 'locals' should be in the same code block as script 1.