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

im trying to make it where if the scp isnt already spawned into workspace it will ?

local S049 = game.ServerStorage["SCP-049"]

function spawnS049()
	if game.workspace:FindFirstChild(S049) == false then
		S049 = game.Workspace
	end
	end
spawnS049()

6 comments

0

Please clarify on what the issue is?

0

sorry, so its supposed to transfer to workspace to become physical and its just well not

0

you're missing "Parent" on line 5

0

oh lemme try that!

0

like S049.Parent?

0

yea

1 answer

✓ Accepted answer
local SCP = game.ServerStorage:FindFirstChild("SCP-049") -- declares the variable as the SCP model

function spawnSCP()
	if game.Workspace:FindFirstChild("SCP-049") == nil then -- if it doesn't exist then
		SCP:Clone().Parent = workspace -- clone it and set it's parent to workspace
	end
end

spawnSCP()

3 comments

0

couldnt I just set it as a clone on line 1? local S049 = game.ServerStorage["SCP-049"]:Clone()

0

Yes, you could. I hadn't because there's a chance you may use the SCP in ServerStorage for something other than cloning.

1

If this is what you're looking for, please accept the answer and mark as solved to help people with a similar situation in the future.

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