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

ScreenGui buttons malfunction in Play Mode,HELP ?

Asked by 7 years ago
Edited 7 years ago

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)
0
How can I make so I could save the script commands correctly unlike it looks right now... ? LordTechet 53 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago
Edited 7 years ago

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)
Ad

Answer this question