Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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


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

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.

8 comments

0

Dang it! Sadly no go :( Its a gui btw

0

Can you specify what script.Parent is and what RunawayArea is?

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?

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

0

Also this is the GUI https://imgur.com/a/AdUcC

0

Check my other question!! that is the thing witch is causing the pain (Also http does that have to do anything with it)

0

Thanks for providing the images, I'm going to edit my answer accordingly now.

0

In regards to your other question, I'm gonna have a look at it now that I've edited my answer here.

This discussion is preserved as it was. New answers, comments, and votes are closed.