Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to ignore HumanoidRootPart?

Hi! I'm trying to make a FPS system and my character will simply flings out of existence. My arms look like this If i change the HumanoidRootPart then the issue is fixed but my animations become broken. Any help?

localscript that adds the arms:

local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local cam = game.Workspace:WaitForChild("Camera")
local arms = game.ReplicatedStorage:WaitForChild("Arms")
local rs = game:GetService("RunService")
local uis = game:GetService("UserInputService")

local plrarms = arms:Clone()
plrarms.Parent = workspace
plrarms.Name = char.Name .. "_Arms"
plrarms:SetPrimaryPartCFrame(cam.CFrame)

rs.RenderStepped:Connect(function()
	plrarms:SetPrimaryPartCFrame(cam.CFrame)
end)
task.wait()
if char:FindFirstChild("Shirt") then
	plrarms.Shirt.ShirtTemplate = char.Shirt.ShirtTemplate
else
	plrarms.Shirt.ShirtTemplate = "rbxassetid://4699552332"
end

localscript that animates it:

local plr = game:GetService("Players").LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local cam = game.Workspace:WaitForChild("Camera")
local arms = workspace:WaitForChild(char.Name .. "_Arms")
local animi = script.Idle
local animr = script.Reload
local animf = script.Fire
local track

track = arms.Humanoid:LoadAnimation(animi)
track.Priority = Enum.AnimationPriority.Action
track.Looped = true
track:Play()

can someone help?

1 comment

0

The Humanoid is in the Char not the arms

2 answers

Don't play animation on a local script, Play it on a server script

2 comments

0

Wouldn't that replicate on the server as well, right?

0

If you play it on the local player then everyone sees that animation play only on the one player

I already fixed this by adding an AnimationController and an Animator inside and renaming HumanoidRootPart. Thanks to everyone who tried to help though!

This discussion is preserved as it was. New answers, comments, and votes are closed.