Using welds and constraints locally to make a fake Tool equipping animation (Since local animations don't work)

Hey developers! I have a tool, and Its all handled by the client… Issue? when I equip the tool, Everyone can see the ‘hand’ move up meaning that they are equiping something, but you can’t see the object. What I want, which should be expected is that the hand is down in the resting position. But somehow the client tells the server that The player is equiping an Item? Yea idk how to fix this. Here is the image of it:


(We both are holding the latern. Expected and wanted: Other player has hand down in resting position. Results: Hand is up, with nothing, but in a holding position)

This is the part of the local script that handles equipping the tool:

local clone = game.ReplicatedStorage.Lantern:Clone()
		EquippedItem = clone.Name
		clone.Parent = game.Players.LocalPlayer.Character
		game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid"):EquipTool(clone)

Any help is much appreciated!

9 Likes

this should help BasePart | Documentation - Roblox Creator Hub

4 Likes

Disable the toolnone animation.

2 Likes

Does not help me as that property makes a part transparent and that is not the goal here. The goal here is to stop this animation on the server, while having it played still on the client. I want it in the resting state, and not so they have no arm.

2 Likes

So I would and wouldn’t. I want it to be played on the client, not the server. How would I go about doing that, so it stays on the client, and not the server?

2 Likes

are you playing the animation through the humanoid or an animator

3 Likes

I am playing no animation. This is roblox’s default equipping animation as the lantern is a tool.

2 Likes

then use an .equipped function to handle whatever you are doing bc tools naturally do not have that issue, possibly overcomplication

2 Likes

Well ok this is what I’m trying to do. I have a tool that is duplicated and made in the client and I focus equip it. I have hidden the toolbar so it can’t be equipped and unequipped. In the Local script I run :EquipTool and even though it’s run on the client, the animation of equipping is run on the server. And I want it to run on the client only

1 Like

game.Players.LocalPlayer.Character:FindFirstChildWhichIsA(“Humanoid”):EquipTool(clone)

why arent you using :WaitForChild() or :FindFirstChild()? might be unrelated but whatever youre doing here in these lines youre grabbing both players

1 Like

This isn’t the whole script as it’s connected in the function. Again they are local scripts so It connects one person in that local script. Totally get and understand why your confused, but my script is already loads beforehand. If I send the full script often people are less likely to help, and I know the issue is relying in the EquipTool: part.

1 Like

run some debug prints and figure out every single little piece in that thing is what you need it to be cause if thats where you think it is

1 Like

I am certain it is that. And this is a default behavior on roblox (Which idk why if this is ran on a local script as its driving me crazy lol). If you would like to run some tests here is what you can do:

→ Make a tool in rep. stroage. Make a local script in a place that runs local scripts

→ Add the following in the local script, and change as needed for the tool

repeat task.wait() until game.Workspace:FindFirstChild(game.Players.LocalPlayer.Name)
local toolclone = game.ReplicatedStorage.Tool:Clone()
print("Loaded")
task.wait(5)
print("Equipping")
--toolclone.Parent = game.Players.LocalPlayer.Character
game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("Humanoid"):EquipTool(toolclone)

And switch inbetween the client and the server.

I can say for certain that it is :EquipTool function or aka ToolClone.Parent = Character that causes this issue

animations automatically transfer server wide

1 Like

Well this does certainly fix my issue it causes other problems such as walking animations breaking on the server (edit). So How can I fix it so that the walking animation is normal as well as any other animation is ok, while the tool animation is local and doesn’t break

well given this code that i havent tried out

local lp = game.Players.LocalPlayer
while not lp.Character or not lp.Character.Parent do wait() print'waiting for char' end
local Character = lp.Character --script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local oldanimator = Humanoid:WaitForChild'Animator'
oldanimator:Destroy()
local newanimator = Instance.new('Animator',Humanoid)

i would say dont destroy the old animator just run ur animations through the new animator but thatll probably not work because i have a hunch roblox wont accept two animators

1 Like

I used a very similar code, I’ll try not deleting it and post it in an edit. The issue is that the Tool when equipped, I don’t pick the animatior for it… It just uh… roblox does that… But let me see

Edit: It just default to the local one made. It doesn’t care

2 Likes

this is definitelly a tricky one my idea was kinda brain dead cause its late. the real way to do it would be revert ur actions after running the animation (go back to the normal animator) WHICH i have no idea how to do so im curious why u dont want other players seeing an action u are doing

1 Like

Reason we want client oriented tools: well because the tool is on the client and managed on the client. Like in this case its a latern, and the area for the usage for the latern is small, and so having 4 users (our max amount) with 4 latern can light up the entire area. There is also other areas that tools aren’t naturally available, unless doing certain things (To allow secrets and different storylines activate) So we don’t want one player to be able to see them doing something else in the area by this animation issue.

2 Likes

ahh i see so you are trying to hide players actions to not giveaway the puzzles in ur game damn ur reasoning is pretty solid

1 Like