Ad
Log in to vote
0

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

Asked by
ssieej 0
1 month 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 — 1mo
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 0 — 1mo
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 — 1mo

Answer this question