I was going to make the script give you 1 cash and destroy. Here is what I have so far:
script.Parent.ClickDetector.MouseClick:connect(function(c) if game.Players.LocalPlayer.TeamColor == ("Really red") then game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.Cash.Value + 1 wait(0.01) script.Parent:Destroy() end end)
No output.
First off, please use the lua button to show code, second off, I would try something along the lines of:
Problems:
Define BrickColor as a BrickColor, not as a string.
LocalPlayer is referenced in what I assume is a server script.
script.Parent.ClickDetector.MouseClick:connect(function(c) if c.TeamColor == BrickColor.new("Really red") then c.leaderstats.Cash.Value = c.leaderstats.Cash.Value + 1 wait(0.01) script.Parent:Destroy() end end)
Problems: 1. Define BrickColor as a BrickColor, not as a string. 2. LocalPlayer is referenced in what I assume is a server script. Wiki Reference