It is because “Torso” doesn’t exist. Torso only exists in R6. In R15 it is UpperTorso and LowerTorso. You’re most likely in R15, so try using UpperTorso or LowerTorso and see which works best.
id already fixed it, since body attach is connected to every gun part, meaning if you move the bodyattach you move the entire gun
That didn’t work either, I was in R6 too. If you have any other solutions just let me know.
Yeah but for a revolver fpr example it is hard to move every part on their own
did you not see what i said after? you can move the entire gun by moving the bodyattach
I saw. I just said my way to animate
oh ok, that makes alot more sense
How can you do this when you import a model? (like made in blender, not roblox studio.)
Hello, can you tell me how did you do that?
Happening to me too. car. (30 limit.)
Whenever I reset my character I lose the model and animation, It’s R6 and the animation is set to the highest priority:
local plr = game.Players.LocalPlayer
local char = plr.Character or plr.CharacterAdded:Wait()
local reloadsound = script.Parent.Handle:WaitForChild('Reload')
local gun = script.Parent
local clipSize = gun.Ammo.Value
local equipped = true
local UIS = game:GetService('UserInputService')
local tool = script.Parent
local idleAnim = char:WaitForChild("Humanoid"):LoadAnimation(script.IdleAnim)
--local shootAnim = char:WaitForChild("Humanoid"):LoadAnimation(script.ShootAnim)
local reloadAnim = char:WaitForChild("Humanoid"):LoadAnimation(script.ReloadAnim)
tool.Equipped:Connect(function()
game.ReplicatedStorage.ConnectM6D:FireServer(tool.BodyAttach)
char.Torso.ToolGrip.Part0 = char.Torso
char.Torso.ToolGrip.Part1 = tool:WaitForChild("BodyAttach")
idleAnim:Play()
end)
tool.Unequipped:Connect(function()
game.ReplicatedStorage.DisconnectM6D:FireServer()
idleAnim:Stop()
end)
UIS.InputBegan:Connect(function(input, gameprocessed)
if not gameprocessed then
if input.UserInputType == Enum.UserInputType.Keyboard then
local keycode = input.KeyCode
if keycode == Enum.KeyCode.R then
if gun.Ammo.Value < clipSize and gun.MaxAmmo.Value > 0 and gun.Equipped then
if not equipped then
return
end
reloadsound:Play()
char.Torso.ToolGrip.Part0 = char.Torso
char.Torso.ToolGrip.Part1 = tool:WaitForChild("BodyAttach")
reloadAnim:Play()
end
end
end
end
end)
--tool.Activated:Connect(function()
--shootAnim:Play()
--end)
Gunserver:
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
local M6D = Instance.new("Motor6D", char.Torso)
M6D.Name = "ToolGrip"
end)
end)
game.ReplicatedStorage.ConnectM6D.OnServerEvent:Connect(function(plr,location)
local char = plr.Character
char.Torso.ToolGrip.Part0 = char.Torso
char.Torso.ToolGrip.Part1 = location
end)
game.ReplicatedStorage.DisconnectM6D.OnServerEvent:Connect(function(plr)
plr.Character.Torso.ToolGrip.Part1 = nil
end)
@Headstackk one question, would this be possible by not making any scripts? I feel like this is very easy to exploit…
But other than that, this is a very cool tutorial!! I will be sure to use this!!
Might use this, but can you give also a tutorial how you can damage players while shooting, or us it already included
for shooting i recommend fastcast
Thx for the info, now can I use some better gun system I guess
In-game, the animation plays on the body but not on the gun. This works fine with a test dummy and ROBLOX animator.
nice tutorial but the second time i do it the gun wont move to the torso?
Hello,
I have a really weird problem, i name one of my part of my butterfly knife Handle and after the anim i realise i have to rename but if i rename it’s removing the animation
Someone know how i can resolve this problem ?
how to stick the tool to the right arm? but if I try to weld. it won’t work properly