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

How do i create a tool using instance.new on a script?

so i want to give the player a sword and then after some time it will get destroyed i tried doing

local Sword = game.Instance.new(ClassicSword, player) and yeah this doesnt work for some reason

how do i get it working

2 answers

local Sword = game.Instance.new(ClassicSword, player) and yeah this doesnt work for some reason

u can clone the sword set the parent of the sword to the serverstorage and clone it from there example

game.Players.PlayerAdded:Connect(function(player)
	local classicsword = game.ServerStorage.ClassicSword
	local cloneofsword = classicsword:Clone()
	cloneofsword.Parent = player.Backpack
end)

set this in a server script i used the playeradded event cause then u can set the parent of the clone to the backpack

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