I tried to make the dead body ragdoll stick with a moving road is runservice dead, help?
Asked by
2 years ago Edited 2 years ago
look i'm trying to make an obby but when player fell out of the car the dead body won't move
idk how to fix it can someone help me, thank you.
01 | local TweenService = game:GetService( "TweenService" ) |
02 | local part = script.Parent |
03 | local model = script.Parent.Parent |
04 | local cframelocation = script.Parent.Parent.StopLiner.Position |
06 | local Info = TweenInfo.new( |
08 | Enum.EasingStyle.Linear, |
09 | Enum.EasingDirection.InOut, |
16 | CFrame = CFrame.new(cframelocation); |
18 | local tween = TweenService:Create(part,Info,Goals) |
22 | local service = game:GetService( "RunService" ) |
24 | local lastposition = script.Parent.Position |
26 | service.Stepped:Connect( function (_, deltatime) |
27 | local currentposition = script.Parent.Position |
28 | local deltaposition = currentposition - lastposition |
30 | local velocity = deltaposition / deltatime |
32 | script.Parent.AssemblyLinearVelocity = velocity |
34 | lastposition = currentposition |
i set the script to client idk why it won't work on a dead body?
please watch the video i sent and you'll know what i mean.
https://streamable.com/exinah