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

gui not becoming visible with localscript?

Asked by 3 years ago

trying to make it so a gui becomes visible when you click on grass when you click on the grass it activates a gui in the player's model in workspace called "spiderchosen" the value is a boolvalue and the value does get set to true however the script does not work https://imgur.com/Iu3uYIZ https://imgur.com/iJNMIbm

local player = game.Players.LocalPlayer
local character = player.Character
wait(1)
local spiderchosen = character.spiderchosen.Value
while wait(.5) do
    if spiderchosen == true then
        script.Parent.Visible = true
        wait(5)
        script.Parent.Visible = false
    end
end

1 answer

Log in to vote
0
Answered by 3 years ago

For accurate data transfer, both of your scripts need to be the same type. If you use a normal script to change the spiderchosen value and use a localscript to check the value, it wont work. Both the scripts need to be the same type. Change both the scripts to the same type and it will work

0
^ Yup. This is a working solution. 2_MMZ 1059 — 3y
Ad

Answer this question