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

My script to change button visibility is not working ?

Well it is so, To a home screen, when and clicked to start this frame is visible = false, hence I try that after this frame becomes false appears the button to teleport to the map, but I am not getting

script.Parent.MouseButton1Click:connect(function()
	if game.StarterGui.BackGroundGUI.Frame.Visible == false then
		script.Parent.Visible = true
	end
 game.Players.LocalPlayer.character.LowerTorso.CFrame = CFrame.new(workspace.Point.Position)
 script.Parent.Visible = false
end)

OBS : If I was in doubt in this game https://www.roblox.com/games/1504622981/Up-Power-Coming-Soon

1 comment

0

Lmao, I see a major error here.... It is 100% working but you are using StarterGui on line 2... try using this: game.Players.LocalPlayer.PlayerGui.BackGroundGUI.Frame.Visible == false then

1 answer

You're changing the Visibility of the StarterGui.

You need to change the Visibility of the BackGroundGUI of the player like so:

local player = game.Players.LocalPlayer
script.Parent.MouseButton1Click:connect(function()
    if player.PlayerGui.BackGroundGUI.Frame.Visible == false then
        script.Parent.Visible = true
    end
 player.character.LowerTorso.CFrame = CFrame.new(workspace.Point.Position)
 script.Parent.Visible = false
end)

1 comment

0

Hey you are br ?

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