Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I move something from Workspace to ReplicatedStorage?

Asked by
Jephi 42
8 years ago
local target1 = CFrame.new(0 - 178, 79, 0)
local target2 = CFrame.new(0 - 178, 205, 0)

if #(game.Players:GetChildren()) > 1 then
    for i, player in pairs(game.Players:GetChildren()) do
        repeat wait() until player.Character ~= nil
        if player.Character.Humanoid.Health ~= 0 then
            game.Workspace.Spawn.Spawn.Enabled = true
            game.Workspace.Lobby.Spawn.Enabled = false
            game.ReplicatedStorage.arena1.Parent = workspace
            player.Character.Torso.CFrame = target1
        end
    end
end

if #(game.Players:GetChildren()) < 1 then
    for i, player in pairs(game.Players:GetChildren()) do
        repeat wait() until player.Character ~= nil
        if player.Character.Humanoid.Health ~= 0 then
            game.Workspace.Spawn.Spawn.Enabled = false
            game.Workspace.Lobby.Spawn.Enabled = true
            game.Workspace.arena1.Parent = ReplicatedStorage
            player.Character.Torso.CFrame = target2
        end
    end
end

Please help me! (I've asked a lot of questions)

0
game.ReplicatedStorage adark 5487 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

Change line 22 of your code to game.Workspace.arena1.Parent = game.ReplicatedStorage. You just weren't referencing it correctly.

0
mmm still some problems LateralLace 297 — 8y
0
are you getting any errors? could you post them? aquathorn321 858 — 8y
Ad

Answer this question