Ball Constraint won't work on moving brick's runservice i need some help please?
my moving road won't convey the ragdoll bodies using ball constraint why it won't move together with the road after they fell out of the car??
Ragdoll system
01 | local CollisionsOn = false |
02 | local ogparent = script.Parent |
03 | script.Parent = game:GetService( "ServerScriptService" ) |
05 | game.Players.PlayerAdded:Connect( function (play) |
06 | play.CharacterAdded:Connect( function (char) |
07 | char.Humanoid.BreakJointsOnDeath = false |
08 | char.Humanoid.Died:Connect( function () |
09 | if char:FindFirstChild( "HumanoidRootPart" ) then |
10 | for _, v in pairs (char:GetDescendants()) do |
11 | if v:IsA( "Motor6D" ) then |
12 | local a 0 , a 1 = Instance.new( "Attachment" ), Instance.new( "Attachment" ) |
18 | v.Part 0. CanCollide = CollisionsOn |
19 | v.Part 1. CanCollide = CollisionsOn |
21 | local b = Instance.new( "BallSocketConstraint" ) |
30 | char.HumanoidRootPart.CanCollide = false |
Moving Brick System
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 |
why runservice won't move the ragdoll body anyway?