What do you want to achieve? If player press 2nd time it will go back to original position
What is the issue? I dont know how to make that.
What solutions have you tried so far? Yes. But nothing.
local Button = script.Parent
local Model = script.Parent.Parent.Parent.Party
rotation = CFrame.Angles(0, math.rad(90), 0)
modelCFrame = Model:GetPivot()
Button.MouseClick:Connect(function(plr)
if plr:GetRankInGroup(GROUPID) >= GROUPRANK then
Model:PivotTo(modelCFrame * rotation)
Model:MoveTo(Vector3.new(-81.226, 5.85, 333.25))
end
end)
local Button = script.Parent
local Model = script.Parent.Parent.Parent.Party
local doorc = Model:GetPivot()
local open = false
Button.MouseClick:Connect(function(plr)
if plr:GetRankInGroup(GROUPID) >= GROUPRANK then
open = not open
if open then
Model:PivotTo(doorc * rotation)
else
Model:PivotTo(doorc)
end
end
end)