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

Ontouch; see GUI and not see GUI.... not working. Why?

Asked by
thePyxi 179
9 years ago

This doesn't seem to be working. I tryed it on the Solo Play in ROBLOX Studio, but in the Output window, it doesn't say anything is wrong. Also, the GUI that is showing doesn't do anything. I can't seem to figure it out. Why is this happening? The script:

local isOn = false

function onTouched()
if isOn == true then off() else on() end end

function on() isOn = true script.Parent.Players.Player.PlayerGui.SnowGUI.GUI.Disabled = false script.Parent.Players.Player.PlayerGui.SnowGUI.Frame.BackgroundTransparency = 0.9 end

function off()
isOn = false script.Parent.Players.Player.PlayerGui.SnowGUI.GUI.Disabled = true script.Parent.Players.Player.PlayerGui.SnowGUI.Frame.BackgroundTransparency = 1 end

script.Parent.Touched:connect(onTouched)

on()

Answer this question