of     1   

brightScarf
#208298725Friday, January 27, 2017 12:09 AM GMT

Hey, so here's my script: local hold = false script.Parent.Touched:connect(function(hit) if not hold then hold = true game.Players.LocalPlayer.PlayerGui.ScreenGui.ImageGui.Enabled = true wait(1) game.Players.LocalPlayer.PlayerGui.ScreenGui.ImageGui.Enabled = false hold = false end end This works in Studio, but not online. What should I do to fix this?
OAuth2
#208298852Friday, January 27, 2017 12:11 AM GMT

Jeez. The reason why it works in studio because play testing basically "plays/converts" the game locally, meaning you can access the local player anywhere. You need to define the player when you want to access it on a real server.
brightScarf
#208298941Friday, January 27, 2017 12:12 AM GMT

@Auth Okay, but how would I still get it to affect all players? I don't want to type every single ROBLOX username in, after all.
OAuth2
#208299029Friday, January 27, 2017 12:14 AM GMT

You don't need to. script.Parent.Touched:connect(function(Hit) if game.Players:GetPlayerFromCharacter(Hit) then local Player = game.Players:GetPlayerFromCharacter(Hit) -- do stuff end end)
brightScarf
#208299229Friday, January 27, 2017 12:17 AM GMT

Ah, gotcha. Okay, I'll try that. Thanks.

    of     1