Hello, everyone.
Currently I am out of my mind, I spent a lot of time figuring out what was wrong with this script…
So, I was working for my customer, he sent me the next model. (I uploaded it to Roblox: Tongue - Roblox). He asked me to rework it a little, since it is bad organized and he needed some modifications.
Looked easy enough for me, until it came to limbs collisions.
Tool got 2 scripts: Local and Server. In the Server script it just does next:
local Tag = workspace:FindFirstChild(TargetName)
for _, v in pairs(Tag:GetDescendants()) do
if v:IsA("Part") then
v.CanCollide = true
end
if v:IsA("Motor6D") then
local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
a0.Name = "a0"
a1.Name = "a1"
a0.CFrame = v.C0
a1.CFrame = v.C1
a0.Parent = v.Part0
a1.Parent = v.Part1
local b = Instance.new("BallSocketConstraint")
b.Attachment0 = a0
b.Attachment1 = a1
b.Parent = v.Parent
v.Enabled = false
end
end
And here is the result:
I tried to copy that and that’s what I got…
The first what came to my mind: “Wait what?”
I looked through the script, tried to change some value, copying entire script to mine. Nothing helped.
I got angry a little, so I left my PC for several hours.
When I decided to come back and check again I decided to check the Local Script.
That’s the point where I stopped understanding roblox physics at all.
What I found was this:
Tag:WaitForChild("Humanoid"):ChangeState(Enum.HumanoidStateType.Ragdoll)
Tag:WaitForChild("Humanoid"):SetStateEnabled(Enum.HumanoidStateType.GettingUp,false)
I tried removing it and this is what I got…
And now question. How is this even related to server physics???
If you check the server script, there is no switching between Network Ownership. Ok, fine, it does automatically, then why if I try to place those lines in Server script it doesn’t work?
Any ideas?