Hi its me again, again I am a beginner, so I want to do this thing that I want to have a spectate gui but when I go to a certain location, it should be disabled or should be hidden, but when it comes back to the original location, the gui should come back, how do i do that?
You can use a Script to detect whether the player has entered the certain position. If this is detected, then fire a Remote Event to the client and the client should change the Ui by a Local Script
1 Like
You can do like this
--Server Script
script.Parent.Touched:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
REMOTEEVENT:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
end
end)
--Local Script
REMOTEEVENT.OnClientEvent:Connect(function(status)
--do Ui stuff like make visible = true
end)
This is how you detect the player has touched the certain part.
script.Parent.TouchEnded:Connect(function(hit)
if hit and hit.Parent and hit.Parent:FindFirstChild("Humanoid") then
REMOTEEVENT:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent))
end
end)
This will detect if the player has finished touching the part.
1 Like
hello thank u i will try it out later thank u so much