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

How can you make a door opening script script into a local script?

Asked by
ssieej 7
2 years ago

Here is the script that I am trying to change

function onClicked()

script.Parent.Parent.Door.Transparency = 1
script.Parent.Parent.Door.CanCollide = false

end script.Parent.ClickDetector.MouseClick:connect(onClicked)

0
I mean, if you just change the "script.Parent.ClickDetector" to the location of the door, it should work fine. the8bitdude11 358 — 2y
0
I am not a pro at scripting and don't know how to add the location into the script, (19, 3, -28.5 is the position I got). Could you help me with the script? ssieej 7 — 2y
0
as a variable, you would just do "local pos = Vector3.new(19,3,-28.5)" and to set the position you would just do "Part.Position = pos" the8bitdude11 358 — 2y

Answer this question