Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Why isnt my Proximity Prompt script making my GUI visible?

This script is not turning on the GUI. Where is the error in my script?

debounce = false
script.Parent.Triggered:Connect(function()
	if debounce == false then
		debounce = true
		script.Parent.Parent.Door_Open.Playing = true
		game.StarterGui.TransitionFadeGui.Frame.Visible = true
	wait(1.5)
		script.Parent.Parent.Door_Close.Playing = true
		game.StarterGui.TransitionFadeGui.Frame.Visible = false
	debounce = false
	end  
end)

Thanks.

1 answer

You are changing it in starter gui so only new players will see it or if you reset. it should be in player.PlayerGui which you can get the player from the first param in triggered

debounce = false
script.Parent.Triggered:Connect(function(player)
    if debounce == false then
        debounce = true
        script.Parent.Parent.Door_Open.Playing = true
        player.PlayerGui.TransitionFadeGui.Frame.Visible = true
    wait(1.5)
        script.Parent.Parent.Door_Close.Playing = true
        player.PlayerGui.TransitionFadeGui.Frame.Visible = false
    debounce = false
    end  
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.