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

How to make a button that repeatedly clones a model?

i have the remote event and the button part down, and can make it clone but it only clones the model once instead of repeatedly cloning the model

local unit = game:GetService("ReplicatedStorage"):WaitForChild("Viking"):Clone()

local function cloneUnit(player)
	print(player.Name)
	
	unit.Parent = workspace
end

2 answers

✓ Accepted answer


local unit = game:GetService("ReplicatedStorage"):WaitForChild("Viking")

local function cloneUnit(player)
    print(player.Name)

    local unitClone = unit:Clone()
    unitClone.Parent = workspace
end


try this?

simple

local function cloneUnit(player)
for i = 1,100 -- 100 is how many times it will be cloned
local unit = game:GetService("ReplicatedStorage"):WaitForChild("Viking"):Clone()

    print(player.Name)

    unit.Parent = workspace
wait(1) -- use this as it will lag the server
end
end

7 comments

0

Any questions?

0

The idea is that it clones one model for every click of the button, but the button clones the model once and thats it

0

i see

0

i see

0

i see

0

is this a local script

0

where is it located

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