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

gui button not expanding on click?

Asked by 5 years ago
Edited 5 years ago

Hi, so I'm editing a friend's game that's created as an Interview Center. There's this button (Screen GUI) that says 'Interview Questions', and when you click on it, it's supposed to expand with the interview questions. However, there's an error and it's not expanding on click. I'm unsure what's causing this and I would like to ask for help. Any feedback / suggestions will be very helpful.

  • FE is turned on.
  • https://i.imgur.com/IJ7SXw5.png (For reference, if it helps any.)

Check (Under ScreenGUI)

repeat wait() until script.Parent.Parent.Name ~= "StarterGui"
plr = script.Parent.Parent.Parent

if plr:GetRankInGroup(3312565) <8 then
    if plr.Name == "" or plr.Name == "aelzc" or plr.Name == "iiPotato_Queenxx" then
        return
    end
    script.Parent:Destroy()
end

Script (Under Button > Button)

script.Parent.MouseButton1Down:connect(function()
    script.Parent.Parent.Visible = false
    script.Parent.Parent.Parent.Questions.Visible = true
end)

Script (Under Questions > Button)

script.Parent.MouseButton1Down:connect(function()
    script.Parent.Parent.Visible = false
    script.Parent.Parent.Parent.Button.Visible = true
end)
0
repeat wait() until script.Parent.Parent.Name ~= "StarterGui" isnt needed, it gets cloned into the Player Gui theking48989987 2147 — 5y
0
also, server scripts dont run on the client and can't modify gui elements(assuming it's not a local script because you said "Script") theking48989987 2147 — 5y
0
@theking Yeah, it's not a local script. Should I make it local? WhiteCamera 1 — 5y
0
LMAO, thank you so much. I made them local and it worked. WhiteCamera 1 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

You need to use local scripts if the script is for that player only.

Ad

Answer this question