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

how would you recall a model out of server storage?

For an example, a map changer, how would I do that? I want to display a model from SS and recall it so it is visible to people

2 comments

0

Do you want to clone it or move it?

0

pie = ServerStorage.Model:Clone(); pie.Parent = workspace; ?

1 answer

This is really simple. You just need the method :Clone() or changing of the Parent. You may connect this to chatting or buttons. I'll show it to you with the following script.

function InsertModelFromSS (modelname)
    if game.ServerStorage:FindFirstChild (modelname) then
        game.ServerStorage[modelname]:Clone ().Parent = workspace
    end
end

game.Players.PlayerAdded:connect (function (plr)
    plr.Chatted:connect (function (msg)
        InsertModelFromSS(msg)
    end)
end)

Cd = Instance.new ("ClickDetector", workspace.Baseplate)
Cd.MouseClick:connect (function(plr)
    game.ServerStorage:GetChildren ()[math.random(1, #game.ServerStorage:GetChildren)]:Clone().Parent = workspace
end)

If you have any questions, feel free to ask.

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