function onClick(mouse)
game.Workspace.RunwayArea.CanCollide = true
end
script.Parent.MouseButton1Down:connect(onClick)
---Yes, the part RunwayArea exists ---No, the script is NOT disabled.
function onClick(mouse)
game.Workspace.RunwayArea.CanCollide = true
end
script.Parent.MouseButton1Down:connect(onClick)
---Yes, the part RunwayArea exists ---No, the script is NOT disabled.
Edit:
The script you made turns out to be almost optimal, still, I would suggest some minor changes:
function onClick(mouse)
game.Workspace:WaitForChild("RunwayArea").CanCollide = true
end
script.Parent.MouseButton1Click:connect(onClick)
Simply changed the .MouseButton1Down for a .MouseButton1Click and added a :WaitForChild(). It should work now.
This discussion is preserved as it was. New answers, comments, and votes are closed.
8 comments
Dang it! Sadly no go :( Its a gui btw
Can you specify what script.Parent is and what RunawayArea is?
Oh, didn't know that. So is your script inside a Gui directly? Could you add an image to your question showing the location of your script on studio?
RunwayArea is a transparent part and when the gui button is clicked it is supposed to make you walk through also Here is an image the script is highlighted https://imgur.com/a/ETbAt
Also this is the GUI https://imgur.com/a/AdUcC
Check my other question!! that is the thing witch is causing the pain (Also http does that have to do anything with it)
Thanks for providing the images, I'm going to edit my answer accordingly now.
In regards to your other question, I'm gonna have a look at it now that I've edited my answer here.