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

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

Asked by 2 years ago

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

Log in to vote
0
Answered by
xXMadonXx 190
2 years ago
Edited 2 years ago

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.

0
And how exactly do I edit the gui of the player? ghostgamer90391 9 — 2y
0
See edit xXMadonXx 190 — 2y
0
Thank you so much. ghostgamer90391 9 — 2y
0
One problem though, I can't activate the button that I turned visible and active. ghostgamer90391 9 — 2y
View all comments (2 more)
0
probably another ui part is not active which is above the button xXMadonXx 190 — 2y
0
Sorry for late response, there's no other ui part over it. ghostgamer90391 9 — 2y
Ad

Answer this question