I have noticed a small thing while making a replicated tween to client. When i set the Enum.EasyingDirection.InOut it doesnt really do the InOut animation. Its more like Out or just different ones. Any idea why? Even if i try different enums (style, direc) its same mostly-.
– video
– script
local ts= game:GetService("TweenService")
local open = false
local busy = false
local tf = TweenInfo.new(2.3, Enum.EasingStyle.Cubic,Enum.EasingDirection.InOut)
local tigger1 = script.Parent.Trigger.ProximityPrompt
local tigger2 = script.Parent.Trigger2.ProximityPrompt
local closedpos1 = script.Parent.Door1.dp.CFrame
local closedpos2 = script.Parent.door2.dp.CFrame
local openpos1 = script.Parent.Door1.open.CFrame
local openpos2 = script.Parent.door2.open.CFrame
local tween = require(game.ServerScriptService.ModuleScript)
local door1 = script.Parent.Door1.dp
local door2 = script.Parent.door2.dp
local souind = script.Parent.Trigger.Sound
local open1tween = ts:Create(door1,tf, {CFrame = openpos1})
local open2tween = ts:Create(door2,tf, {CFrame = openpos2})
local cloase1 = ts:Create(door1,tf, {CFrame = closedpos1})
local cloase2 = ts:Create(door2,tf, {CFrame = closedpos2})
tigger1.Triggered:Connect(function(plr)
if busy == false then
if open == false then
busy = true
local properties = {CFrame = openpos1}
local tweeinfo = tf
tween.Tween(door1, tweeinfo, properties)
local properties = {CFrame = openpos2}
tween.Tween(door2, tweeinfo, properties)
souind:Play()
wait(3)
script.Parent.Open.Value =true
open = true
busy =false
else
busy = true
local properties = {CFrame = closedpos1}
local tweeinfo = tf
tween.Tween(door1, tweeinfo, properties)
local properties = {CFrame = closedpos2}
tween.Tween(door2, tweeinfo, properties)
souind:Play()
wait(3)
open = false
script.Parent.Open.Value = false
busy =false
end
end
end)
tigger2.Triggered:Connect(function(plr)
wait(.1)
if busy == false then
if open == false then
busy = true
local properties = {CFrame = openpos1}
local tweeinfo = tf
tween.Tween(door1, tweeinfo, properties)
local properties = {CFrame = openpos2}
tween.Tween(door2, tweeinfo, properties)
souind:Play()
wait(3)
script.Parent.Open.Value =true
open = true
busy =false
else
busy = true
local properties = {CFrame = closedpos1}
local tweeinfo = tf
tween.Tween(door1, tweeinfo, properties)
local properties = {CFrame = closedpos2}
tween.Tween(door2, tweeinfo, properties)
souind:Play()
wait(3)
open = false
script.Parent.Open.Value = false
busy =false
end
end
end)