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

The script to rotate the door doesn't work, I don't know why?

Asked by 2 years ago
Edited 2 years ago

Hello, I have a problem with the script and I don't know why it doesn't work. Here's the script.

local GroupID = 14223507
local MinimumRank = 253
local Door = game.Workspace.Door

local TweenService = game:GetService("TweenService")

game.Players.PlayerAdded:Connect(function(Player)
    Player.Chatted:Connect(function(Message)
        if Player:GetRankInGroup(GroupId) >= MinimumRank then
            if Message == "!OpenDoor" then
                local DoorTween = TweenService:Create(Door, TweenInfo.new(1), {Orientation  = Door.Orientation + Vector3.new(0, Door.Orientation.Y, 90)})
                DoorTween:Play()
            elseif Message == "!CloseDoor" then
                local DoorTween = TweenService:Create(Door, TweenInfo.new(1), {Orientation = Door.Orientation - Vector3.new(0, Door.Orientation.Y, 90)})
                DoorTween:Play()
            end
        end
    end)
end)
0
Do you have a problem with closing or opening the door? KeyGua2_0 6 — 2y
0
Open and close. All isn’t working Bartosz_olsztyn 16 — 2y

Answer this question