Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't the GUI popping up for everyone? [closed]

Asked by 9 years ago

This question already has an answer here:

PlayerGui only works for me, not others!?

When one person steps on a brick it shows it to him, but when another person steps on a brick right after that person it doesn't show it to that person. Please help!

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)

I will be grateful if you help me :D

0
Please help NonSpace 0 — 9y
0
It seems like the 10 second wait is causing the debounce to delay. Try moving the "debounce = false" on line 18 before the wait(10). ultimate055 150 — 9y

Marked as Duplicate by NotsoPenguin, EzraNehemiah_TF2, Redbullusa, and Goulstem

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?