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

Move Models from Lighting to Workspace Dependant on a Value?

In my upcoming game, I am wanting certain models to be transfered from Lighitng into Workspace by the Value of an IntValue named "Counter". So, when the server reaches a milstone such as being over an hour old, a bronze trophy appears by the spawn for the server to see. Then after 2 hours, a silver one appears, and so forth. I have no probelms programming the "Counter", but I'm struggling on finding a way for the Models of the Trophies to be transferred from Lighting to Workspace. The server log reports no errors, but the Models are not being transferred after the certain value, so I'm unsure what I'm doing wrong. Here's the current script:

local value = game.Workspace.Counter.Value

local gold = game.Lighting.Prize.Gold

local bronze = game.Lighting.Prize.Bronze

local silver = game.Lighting.Prize.Silver

while true do

if value > 10 then
	bronze.Parent = game.Workspace
end

if value > 25 then
	silver.Parent = game.Workspace
end

if value > 50 then
	gold.Parent = game.Workspace
end

wait(3)	

end

1 answer

✓ Accepted answer

This would probably replace all the bronze.Parent etc better.

x = bronze:Clone()

x.Parent = game.Workspace

z = silver:Clone()

z.Parent = game.Workspace

b = gold:Clone()

b.parent = game.Workspace

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