So basically i need a script where once you are touching a part it DISABLES a CERTAIN GUI in STARTERGUI and once you are not touching it, its back to normal (enabled)
Can someone help
So basically i need a script where once you are touching a part it DISABLES a CERTAIN GUI in STARTERGUI and once you are not touching it, its back to normal (enabled)
Can someone help
I haven't tested this but it should work
script.Parent.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
player.PlayerGui.GUINAMEHERE.Enabled = false
end
end)
script.Parent.TouchedEnded:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
player.PlayerGui.GUINAMEHERE.Enabled = true
end
end)
put this script inside the part
This discussion is preserved as it was. New answers, comments, and votes are closed.