part = script.Parent
part.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
plr.PlayerGui.upd.Enabled = true
end)
that script run only once, but must run any time player touching part. Why?
part = script.Parent
part.Touched:Connect(function(hit)
local plr = game.Players:GetPlayerFromCharacter(hit.Parent)
plr.PlayerGui.upd.Enabled = true
end)
that script run only once, but must run any time player touching part. Why?
Share Improve this question asked Mar 27 at 11:26 YanichegoneumeyuYanichegoneumeyu 1 4 |1 Answer
Reset to default -1I found the solution. I created a remote event that sent a request switch GUI to the client
print("Touched")
inside the function, does it only print once? I think your issue might not be in this code specifically. To better help you out, could you tell us what you are trying to do, and what you are seeing happen? – Kylaaa Commented Mar 27 at 14:19