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

Object not cloning, what have I done wrong?

My code is not cloning my item so, I am unable to do anything until I find the cause of this. Any help would be appreciated.

function TestService:Spawn(Player, Weapon)
	if Weapon ~= Items.IDArray[Weapon] then
		game.ReplicatedStorage.SuccessMessage:FireClient(Player, "? Successfully found "..Weapon.." with ID "..Items.IDArray[Weapon].ID)
		
		-- Welding
		local Weapon = game.Workspace[Weapon]
		local WeldC0 = Instance.new("Weld", Weapon.Model.Handle)
		local WeldC1 = Instance.new("Weld")
		WeldC0.Name = "WeldC0" 
		WeldC1.Name = "WeldC1"
	else
		game.ReplicatedStorage.ErrorMessage:FireClient(Player, "? Sorry, I couldn't find "..Weapon.." in my Array!")
	end
end

I am unable to provide an error message as nothing is outputted and no errors occur. It just doesn't clone.

2 comments

0

The code does have a clone statement also. Sorry, I forgot to add that in.

0

It's at link 6 game.Workspace[Weapon]:Clone()

1 answer

I know you wont care at this point but its at line 6 u wanna clone it using :Clone()

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