I made a script that makes gui visible after touched by a part and I made it so each frame contains textboxes that appear after another but after the first textbox appears, the rest don't work. Why isn't it working?
local Part = script.Parent
Part.Touched:Connect(function(HIT)
local H = HIT.Parent:FindFirstChild("Humanoid")
if H then
wait(5)
local Player = game.Players:GetPlayerFromCharacter(HIT.Parent)
Player.PlayerGui.ScreenGui.Frame.Visible = true
wait(10)
Player.PlayerGui.ScreenGui.Frame.Visible = false
wait(5)
Player.PlayerGui.ScreenGui.Frame2.Visible = true
wait(2)
Player.PlayerGui.ScreenGui.Frame2.Visible = false
end
end)
P.S. the script came from a part that makes these guis visible and localscript has nothing to do with this question

3 comments
where do i put the remote event
and how do i use it for ui changing?
That's a model you'll have to learn yourself https://medium.com/roblox-development/understanding-filteringenabled-part-1-3ccff00ba24c