The script below is me trying to make a button when clicked makes the button invisible as well as the rest of the model attached to the button, i'm normally good at this stuff but i'm confused why my code is not working in the sense that the icon to click isn't coming up, it won't click. It is inside a normal script, a neon colour to the brick, i am trying to make one of the click the button games but somehow it isn't working, any help would be great, thanks.
local stand = game.workspace.Stand
local standtip = game.workspace.StandTip
local button = script.Parent
local ClickDetector = Instance.new("ClickDetector")
ClickDetector.Parent = button
ClickDetector.MaxActivationDistance = 15
ClickDetector.MouseClick:Connect(function()
button.Transparency = 1
stand.Transparency = 1
standtip.Transparency = 1
button.CanCollide = false
stand.CanCollide = false
standtip.CanCollide = false
end)

4 comments
like come on give us some details about it, how are we supposed to know what is causing the problem? What exactly is not working? Is it LocalScript? Are there errors in the output? If you put more effort into the question then it is more likely that someone is going to solve it.
sorry
The script should work. Please send us the error message (if any) and check that all the variables are defined as the correct part.
try removing
game.ingame.workspaceor capitalizeworkspacesuch as usinggame.Workspace