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

ScreenGui buttons malfunction in Play Mode,HELP ?

I've tried to search the web for this issue, but haven't found any help for that... The problem is that my ScreenGui buttons work fine and function in 'Edit Mode's 'Test Mode' But once I go to play the real game, the buttons do not function... I have no idea what I'm supposed to do to fix it so I hope that one of you will help me,please !

game.StarterGui.ScreenGui.Background.MENU.1P.LocalScript

Button = script.Parent
OneP = script.Parent.Parent.Parent.TAB.OneP
TwoP = script.Parent.Parent.Parent.TAB.TwoP
SPECIAL = script.Parent.Parent.Parent.TAB.SPECIAL
CART = script.Parent.Parent.Parent.STAB.CART
ART = script.Parent.Parent.Parent.STAB.ART
SCRIPTERS = script.Parent.Parent.Parent.STAB.SCRIPTERS
IDEAS = script.Parent.Parent.Parent.STAB.IDEAS

Button.MouseButton1Click:connect(function()
	OneP.Visible = true
	TwoP.Visible = false
	SPECIAL.Visible = false
	CART.Visible = false
	ART.Visible = false
	SCRIPTERS.Visible = false
	IDEAS.Visible = false
end)

1 comment

0

How can I make so I could save the script commands correctly unlike it looks right now... ?

1 answer

✓ Accepted answer

EDIT: You forgot the local ;/ here u go:

local Button = script.Parent
local OneP = script.Parent.Parent.Parent.TAB.OneP
local TwoP = script.Parent.Parent.Parent.TAB.TwoP
local SPECIAL = script.Parent.Parent.Parent.TAB.SPECIAL
local CART = script.Parent.Parent.Parent.STAB.CART
local ART = script.Parent.Parent.Parent.STAB.ART
local SCRIPTERS = script.Parent.Parent.Parent.STAB.SCRIPTERS
local IDEAS = script.Parent.Parent.Parent.STAB.IDEAS

Button.MouseButton1Click:connect(function()
    OneP.Visible = true
    TwoP.Visible = false
    SPECIAL.Visible = false
    CART.Visible = false
    ART.Visible = false
    SCRIPTERS.Visible = false
    IDEAS.Visible = false
end)

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