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
local button = script.Parent button.MouseButton1Click:Connect(function() workspace.testing.CanCollide = false end)
This did work for me when I tested it, if it didn't work for you, then I'd suggest looking at the spelling of the part to make sure you don't have any capitalization errors. You might also have had the hierarchy wrong and didn't realize it?