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

a problem with changing a door's position, what's wrong here?

Asked by
net_h 13
4 years ago

I have a door, it consists of 4 handles and the main door part, all are anchored. Two problems, In my script i want the door to rotate but with anchor on it can't rotate it can only move, if I turn off anchor then players can push it

second problem is whenever I try to change its position so that when it rotates it doesn't go out it skips the door handles, meaning if i move it 0.5 to the left it goes on the opposite side of the door handle since it cant collide with it. Any help?

local sound = Instance.new("Sound", game.workspace)
sound.SoundId = "rbxassetid://252754492"

function openDoor()
    sound:Play()
game.Workspace.Door.RotVelocity = Vector3.new(0,10,0)
wait(0.2)
game.Workspace.Door.Position = Vector3.new(0.5,0.5,0)
    wait(1)
game.Workspace.Door = Vector3.new(0,0,0)

end
game.Workspace.Door.ClickDetector.MouseClick:connect(openDoor)
0
try to weld the door's parts (only the handle AND the door together) RAFA1608 543 — 4y
0
or anything else connected to the door RAFA1608 543 — 4y

Answer this question