#Making a door open

1 messages · Page 1 of 1 (latest)

drowsy shoal
#

Hey i need some help making this door open. Every part is welded to the models primary part and everything expect the primary part is un-anchored.

Here's the script

local Door = script.Parent
local Status = false

Door.ClickDetector.MouseClick:Connect(function()
    if Status == false then
        Door.Position = Vector3.new(161.029, 6.735, 90.567)
        Door.Orientation = Vector3.new(0, 90, 0)
        Status = true
        
    elseif Status == true then
        Door.PrimaryPart.Position = Vector3.new(157.16, 3.19, 92.57)
        Door.PrimaryPart.Orientation = Vector3.new(0, 0, 0)
    end
end)```
forest onyx
#

try this

#

local TS = game:GetService("TweenService")
local Door = script.Parent
local Status = false

Door.ClickDetector.MouseClick:Connect(function()
if Status == false then
Door.PrimaryPart.Position = Vector3.new(161.029, 6.735, 90.567)
Door.PrimaryPart.Orientation = Vector3.new(0, 90, 0)
Status = true

elseif Status == true then
    Door.PrimaryPart.Position = Vector3.new(157.16, 3.19, 92.57)
    Door.PrimaryPart.Orientation = Vector3.new(0, 0, 0)
end

end)

forest onyx
#

did it work

drowsy shoal