Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Expected identifier when parsing expression, got '=' ?

local deb = true 
script.Parent.Clicker.ClickDetector.MouseClick:connect(function(wat)
	if deb == true then
		deb = false
		game.ServerStorage.PlayerMoney:FindFirstChild(player.Name) = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name) + 15
		deb = true
	end
end)

I just started working on a tycoon and I don't know how to change PlayerMoney. I use Zednov's tycoon and a friend helped me a bit, but I got this error, any ideas?

Also, what does "deb" do? I think is something to avoid auto-clickers, but I don't know how it works exactly.

Thank you!

1 answer

Never mind. I found a solution. Instead of

 game.ServerStorage.PlayerMoney:FindFirstChild(player.Name) = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name) + 15

I made a variable to memorize that:

local PlayerCash = game.ServerStorage.PlayerMoney:FindFirstChild(player.Name)
		PlayerCash = PlayerCash + 15

This discussion is preserved as it was. New answers, comments, and votes are closed.