Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

The script works by itself but im not sure, why it does not work with others?

Asked by 6 years ago

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.

1 answer

Log in to vote
-1
Answered by 6 years ago
Edited 6 years ago

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.

0
Dang it! Sadly no go :( Its a gui btw ANDREW50060 1 — 6y
0
Can you specify what script.Parent is and what RunawayArea is? Z_DC 104 — 6y
0
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? Le_Teapots 913 — 6y
0
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 ANDREW50060 1 — 6y
View all comments (4 more)
0
Also this is the GUI https://imgur.com/a/AdUcC ANDREW50060 1 — 6y
0
Check my other question!! that is the thing witch is causing the pain (Also http does that have to do anything with it) ANDREW50060 1 — 6y
0
Thanks for providing the images, I'm going to edit my answer accordingly now. Le_Teapots 913 — 6y
0
In regards to your other question, I'm gonna have a look at it now that I've edited my answer here. Le_Teapots 913 — 6y
Ad

Answer this question