I am making a tycoon, and the part that does not work is when the item touches the furnace, it gives you money. It works perfectly in studio but not in game. Can someone explain why? Thanks.
here is the script:
local Part = script.Parent
Part.Touched:connect(function(hit)
if hit.Name == "Shirt" then
wait(1)
hit:Destroy()
game.Players.LocalPlayer.leaderstats.Cash.Value = game.Players.LocalPlayer.leaderstats.Cash.Value + 20
end
end)

2 comments
is this in a localscript or server script?
This won't work in either, because you use LocalPlayer, but this script is in the workspace, ServerScripts can't use LocalPlayer, and LocalScripts can't be in the workspace