Every time i use a PlayerGui (brick onTouch) a GUI pops up for me and thats great, but then when a person touches the same button after me it doesn't work. Why is that? Please don't thumbs down, i just need to know
debounce = false
script.Parent.Touched:connect(function(hit)
if debounce == false then
debounce = true
local humanoid = hit.Parent:FindFirstChild("Humanoid")
if humanoid then
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
player.PlayerGui.Intro.Window.Text.Visible = true
player.PlayerGui.Intro.Window:TweenPosition(UDim2.new(0,0,0.5,150))
player.PlayerGui.Intro.Window.Text.Text = "Remember what i said? Red bricks are a no no. Try to avoid them as much as possible! (Hint: They kill you) ~NonSpace"
-- first time learning Tweening!
wait(10)
player.PlayerGui.Intro.Window:TweenPosition(UDim2.new(0,0,0.5,400))
wait(1)
player.PlayerGui.Intro.Window.Text.Visible = false
debounce = false
end
end
end)

4 comments
Have you checked for errors after having stepped on the part?
yeah, no errors
Could you edit your post and add the code?
ok