Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Clone helmet to player position?

Hey guys!

I have this script where I need the helmet to clone from the ServerStorage to the player. I don't know how to do so however. Anyone got any ideas?

script.Parent.MouseButton1Down:connect(function()
playername = script.Parent.Parent.Parent.Parent.Name
playerteam = script.Parent.Parent.Parent.Parent
player = Workspace:FindFirstChild(""..playername.."")
if player ~= nil then
	player:FindFirstChild("Shirt").ShirtTemplate = "http://www.roblox.com/asset/?id=267460168" 
	player:FindFirstChild("Pants").PantsTemplate = "http://www.roblox.com/asset/?id=267460509"
	wait(1)
	game.ServerStorage.BlueHelmet:Clone().player.head --I have no idea what to do here
end
end)

This is inside a Local Script, so if I need a separate script to do this, let me know!

Cheers,

Michael

2 answers

✓ Accepted answer

You can use a variable to index clones and new instances.

local helmet = game.ServerStorage.BlueHelmet:Clone()
helmet.Parent = player

1 comment

0

Thanks! Now my racers have helmets! :3

I'm confused on what your trying to say, but if you want to move the hat to the right position, maybe this would work: ... BlueHelmet:MoveTo(Player.Character.Head.Position)

1 comment

0

I need it cloned from ServerStorage first.

This discussion is preserved as it was. New answers, comments, and votes are closed.