Making a shuriken throwing tool, when the shuriken is thrown it is supposed to stop its velocity on hit and weld to the object it hit in the spot it hit it. Currently the first one binds to my own character and the rest go out and freeze mid air about half a second later.
code:
shuriken.Touched:Connect(function(Hit)
if Hit.Name ~= Char.Name then
VeloCity:Destroy()
local weldcons = Instance.new("WeldConstraint")
weldcons.Parent = shuriken
weldcons.Part1 = shuriken
weldcons.Part0 = Hit
if Hit:IsA("BasePart") then
local Humanoid = Hit.Parent:FindFirstChild("Humanoid")
if not Hit:IsDescendantOf(Char) then
if Humanoid then
if Humanoid.Health > 0 then
Humanoid:TakeDamage(3)
local hitanim = Instance.new("Animation")
hitanim.AnimationId = "rbxassetid://7826739990"
local animplayer = Humanoid:LoadAnimation(hitanim)
animplayer:Play()
end
end
end
end
end
end)
Video of whats happening ingame:
https://gyazo.com/c50bf959163a4ee97636f13ec2405f1a
ignore synthwave music in the background :)