script.Parent.MouseButton1Click:Connect(function() game.workspace.testing.CanCollide = false end)
It's anincredibly simple script. When I click this textbutton, the part that is named testing will become uncollidable.. but it isn't working?? A little help?
If you're wondering, the script's parents is a textbutton, then a frame, then surface gui, then a part, and THEN the workspace.
I'm confused on why it isn't working despite it being so simple

5 comments
Since you are working with guis, the SurfaceGui should be in StarterGui, and you can set the Adornee to whatever part t should be adorned to, and make your script a local script because you are handling GUI input
are you using an actual clickdetector?
I'm mixing things up
OP is not using a click detector. But rather a SurfaceGui. Which makes the title misleading.
yEP im sorry that the title is kind of misleading,, it isn't a click detector