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

Visible and active property set to true, but I can't interact nor see it, how do I fix this?

Hello, I have a script that sets a textbutton's visible and active property to true. But I don't see the textbutton. And my script is a localscript.

I tried searching many times on how I could fix this but I didn't find the right answer.

Here is the code:

game.StarterGui.FloatyBrickConversation.ImageLabel.Response1.Active = true
game.StarterGui.FloatyBrickConversation.ImageLabel.Response2.Active = true
game.StarterGui.FloatyBrickConversation.ImageLabel.Response1.Visible = true
game.StarterGui.FloatyBrickConversation.ImageLabel.Response2.Visible = true

Please help me.

1 answer

✓ Accepted answer

You need to edit the Gui of the player and not the StarterGui. By editing the StartGui (server-side) only new players that join are going to see the edits, as StarterGui copys its children to the player because it is only a container. Also your localscript does nothing as it can not really edit StarterGui except for you.

For more info read [StarterGui as a Container]: StarterGui Documentation

Edit: PlayerGui is located under the Player. To access it (locally):

game:GetService("Players").LocalPlayer.PlayerGui -- your GUIs from StarterGui are children from player.PlayerGui

You can also see this ingame (or when you test) and open your Player in the Explorer.

6 comments

0

And how exactly do I edit the gui of the player?

0

See edit

0

Thank you so much.

0

One problem though, I can't activate the button that I turned visible and active.

0

probably another ui part is not active which is above the button

0

Sorry for late response, there's no other ui part over it.

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