CAROR567
(CarorDeHauteville)
July 27, 2021, 3:28pm
#22
local motor
...rest
Tool.Equiped:Connect(function()
motor = Instance.new()
...rest
end)
Tool.Unequiped:Connect(function()
motor:Destroy()
end)
Try this. It should work on a server script.
(Use the old method u did to set the motor parent (script.Parent.Parent.Torso)
1 Like
x1_EE
(BucketOPaint)
July 27, 2021, 3:28pm
#23
You could use a remote, or a joined loop, or a player count (thats useless though)
x1_EE
(BucketOPaint)
July 27, 2021, 3:30pm
#25
I think it should be
local motor
...rest
Tool.Equipped:Connect(function()
motor = Instance.new()
...rest
end)
Tool.Unequipped:Connect(function()
motor:Destroy()
end)
once tools are equipped, the become a child of the character that equipped them, so using the equipped event, you can get a character by using the tool.parent since the parent of the tool is the character after its equipped
CAROR567
(CarorDeHauteville)
July 27, 2021, 3:31pm
#27
Yeah, I’ll probably disable the autocorrect
x1_EE
(BucketOPaint)
July 27, 2021, 3:32pm
#28
Adding on to f0x,
local tool = script.Parent
local player = tool.Parent
-- the player is the character
or
script.Parent.Parent -- the character
Could work too.
@CrazyGrapefruit32
Motor6D aint spawning, did I do something wrong (clearly, but what)?
CAROR567
(CarorDeHauteville)
July 27, 2021, 3:37pm
#30
under Instance.new set the motor.Parent to script.Parent.Parent.Torso
x1_EE
(BucketOPaint)
July 27, 2021, 3:38pm
#31
Use this one! The other is spelt incorrectly.
x1_EE
(BucketOPaint)
July 27, 2021, 3:38pm
#32
local motor
...rest
Tool.Equipped:Connect(function()
motor = Instance.new("Motor6D")
...rest
end)
Tool.Unequipped:Connect(function()
motor:Destroy()
end)
1 Like
Thank you both of yall this works! I’ll set it to solution for anyone that has a similar issue
x1_EE
(BucketOPaint)
July 27, 2021, 3:40pm
#34
You welcome, have any other issues? Dm me!