#Cant change gui visibility in local script

1 messages · Page 1 of 1 (latest)

charred urchin
#

i was told to use local player to change the gui stats but it dosent work, any idea on how to solve?

finite trellis
leaden belfry
#

@charred urchin

#

itas meant to be

#
Frame = script.parent
Frame.Transparency = 0.5
Frame.Visible = false
charred urchin
#

imma send some images

#

i tried to just create a normal script because for some reason mousehoverenter didnt work in the local script

#

but this one is a local

finite trellis
# charred urchin

This is only going to run once and never again, so if script.Parent.Value.Value is false when the script runs, it'll be invisible.

charred urchin
#

holy i gotta have more attention

#

thx tho

#

helped alot

#

wait it still didnt work

finite trellis
charred urchin
#

first i tried adding a while true loop, but it didint work, so i wondered if it was the else, so i set it to else if script.parent.value.velue == true

finite trellis
charred urchin
#

alr

#

thats the local script]

finite trellis
# charred urchin

I think it's better to use GetPropertyChangedSignal for the value instead.

script.Parent.Value:GetPropertyChangedSignal("Value"):Connect(function()
  -- if statement here
end)

and if you want to simplify it, you can just set playergui.ScreenGui.ImageLabel.Visible directly to script.Parent.Value.Value, the if statement isn't really necessary

charred urchin
#

so like this?

finite trellis
charred urchin
#

oh alr

#

sorry if im bothering you

finite trellis
charred urchin
#

yes i did, it didnt work but i think its a bug because i tried doing a work around to the problem, im going to rewrite the other scripts to see if it works

#

would it break the game if i changed the startergui insted of the local player gui?

charred urchin
#

like what if i changed the startergui like this

finite trellis
# charred urchin

Why would you want to do that? That won't change the current GUI, just the template that gets copied over

hollow compass
#

bruh

charred urchin
#

oh alr, but using the player gui just dosent work and i dont know why, i think i might just delete this thing from the game

hollow compass
charred urchin
#

ik

#

but i remember it somehow working

finite trellis
hollow compass
#

i suggest check your output window for errors

#

the instances probably dont exist yet

charred urchin
#

wdym

grave crystalBOT
#

studio** You are now Level 4! **studio

hollow compass
#

or you spelled something wrong

hollow compass
charred urchin
#

alr

#

i did this, but when i check the boolean value it does change but when i check the player gui it dosent still

#

can local scripts not read values that are not inside of it?

finite trellis
charred urchin
#

heres my workspace for context

thick lintel
#

just do
part = Value.Value

charred urchin
#

so like this?

thick lintel
#

ur playergui

#

or whatever part u want the value to change