I was trying to do is when a player click the button with his/her mouse the button suppose to disappear. But, I failed. Here's the script if anyone can help me i'll be grateful.

function on()
 isOn = true
 script.Parent.Transparency = 0
 script.Parent.CanCollide = true 
end

function off()
 isOn = false
 script.Parent.Transparency = .5 
 script.Parent.CanCollide = false 
end

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

end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

on()

1 comment

0

lol taking skeledotlua codes