Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why is my code not putting the instance of bodyangularvelocity in my characters righthand?

Asked by 5 years ago
Edited 5 years ago

local players = game:GetService("Players") local tool = script.Parent game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local b = Instance.new("BodyAngularVelocity",character["RightHand"]) end) end) tool.Equipped:Connect(function(mouse) end) tool.Activated:Connect(function() end)

1 answer

Log in to vote
0
Answered by
Unhumanly 152
5 years ago

Comparing the question to the code you have, I can see that you are putting a BodyAngularVelocity inside of the right hand of players that are joining the game, not your right hand.

local tool = script.Parent
local player = tool.Parent

player.CharacterAdded:Connect(function(character)
    local b = Instance.new("BodyAngularVelocity",character.RightHand)

end)

tool.Equipped:Connect(function(mouse)

end)


tool.Activated:Connect(function()


end)

Also, you don't need to do this:

character["RightHand"]

Because there aren't any spaces in the name of the instance.

Ad

Answer this question