I have a script that will put a Motor6D called Hitbox and a Model called RightHandHitBox for once a player joins the game.

Script

local Players = game:GetService("Players")
local ServerStorage = game:GetService("ServerStorage")

 
Players.PlayerAdded:Connect(function(Player)
    game.ReplicatedStorage.Server2Client.Intro:FireClient(Player)
 
    local Character = Player.Character or Player.CharacterAdded:Wait();
	local HitBoxWeld = ServerStorage.Hitbox:Clone()
    local RightHandHitBox = game.ReplicatedStorage.RightHandHitBox:Clone()
    RightHandHitBox.Parent = Character.RightHand
	HitBoxWeld.Parent = Character.RightHand
end)

I check my player's RightHand and it only comes up with Hitbox inside.

I have a local script that waits for RightHandHitBox to appear in the RightHand, then it will print found hitbox.

And then once a player presses a key, it runs again and checks for RightHandHitBox. This time there is an infinite yield. I checked and RightHandHitBox is nowhere to be seen. (As provided by the link above)

LocalScript

local RightHandHitBox = Character.RightHand:WaitForChild("RightHandHitBox")
print("found hitbox")

UIS.InputBegan:Connect(function(Key)
	
	local RightHandHitBox = Character.RightHand:WaitForChild("RightHandHitBox")
	print("found hitbox")
end

2 comments

0

The weld has not been attached to the player's RightHand, you just placed its parent as that instance. Use the weld.Part0 and weld.Part1 properties after adding it to the player

0

Thanks loads, SerpentineKing!