The following script works in studios but not in roblox player, I think the main reason as to why it doesn't work is due to the fact that in studios solo, there is only one player to give it to but in actual roblox servers, there are many players and so it doesn't know which to give it to?? It does print "hit" in both roblox player and studios, which is why I thought ^ was the problem. I could be completely wrong but that's why I'm asking you guys :)
local goldC = script.Parent switch = false local function Value(part) print("hit") if switch == false then switch = true workspace.Events.GoldCoin:FireServer() goldC.Transparency = 1 wait(15) goldC.Transparency = 0 switch = false end end goldC.Touched:connect(Value)
If possible explain as much as you can as to what I did wrong, assuming it was actually not what I thought was wrong, thanks.