#Need help using tween service

14 messages · Page 1 of 1 (latest)

compact wagon
#

the code:

game.ReplicatedStorage.PlayerTouched.OnClientEvent:Connect(function(platform,TimeToRun,X,Y,Z,difficulty)
    if platform.Transparency == 0 then
        local ts = game:GetService("TweenService")
        local tween = ts:Create(platform,TweenInfo.new(TimeToRun,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false),{CFrame = CFrame.new(X,Y-20,Z)})
        local tween2 = ts:Create(platform,TweenInfo.new(TimeToRun,Enum.EasingStyle.Linear,Enum.EasingDirection.Out,0,false),{Transparency = 1})
        tween:Play()
        tween2:Play()
        wait(TimeToRun+0.3)
        platform.CanCollide = false
        platform.CFrame = CFrame.new(X,Y,Z)
        platform.Transparency = 0
        platform.CanCollide = true
        
    end
end)
#

i need the tweenservice

#

to sort of animate it when it falls

#

its for an obby

#

xd

#

bro

#

these only 1 problem

#

and prob a simple fix

#

it does a 180 degree rotation mid falling

#

for no reason i can see

#

its a simple platform

#

this is what it looks like

#

no