help my orientation tween is broken.In studio is perfectly fine but when in the game the orientation gone opposite
in studio =
close:

open:

in game=
close:

open:

also this happen to all my asset with the same script and tween
help meee…
local tweenservice = game:GetService("TweenService")
local hinge = script.Parent:WaitForChild("Hinge")
local tweeninfo = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
)
local tweeninfo2 = TweenInfo.new(
0.5,
Enum.EasingStyle.Linear,
Enum.EasingDirection.In,
0,
false,
0
)
local open = tweenservice:Create(hinge, tweeninfo ,{Orientation = Vector3.new(0, -155, -70), Position = Vector3.new(-19.681, 6.708, 108.054)})
local close = tweenservice:Create(hinge, tweeninfo2 ,{Orientation = Vector3.new(0, -155, 0), Position = Vector3.new(-17.745, 8.195, 107.151)})
local function Check()
local Door = game.Workspace.OpenGarage
local MinRegion = Door.Position - (Door.Size / 2)
local MaxRegion = Door.Position + (Door.Size / 2)
local DoorRegion = Region3.new(MinRegion, MaxRegion)
local Whitelist = {} -- The whitelist of parts can be found by Region3, we will make it only detects player.
for _, Player in pairs(game.Players:GetPlayers()) do
if Player.Character then
table.insert(Whitelist, Player.Character.PrimaryPart)
end
end
local TouchingPart = workspace:FindPartsInRegion3WithWhiteList(DoorRegion, Whitelist)
if #TouchingPart == 0 then
close:Play()
close.Completed:Wait(0.01)
else
open:Play()
open.Completed:Wait(0.01)
end
end
while wait(0.1) do
Check()
end
this is door detect player script