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

Why can't I change workspace to ReplicatedStorage? {Not Answered}

Asked by 4 years ago
Edited 4 years ago

Orignal Scirpt But I Wanna Change The workspace on the 6 line To ReplicatedStorage.

    wait(3)
    local plrs = game.Players:GetChildren()
    for i = 1,#plrs do
        local num = math.random(1,32)
        plrs[i].Character.HumanoidRootPart.CFrame = CFrame.new(workspace.Teleporters.Teleparts["Part"..num].Position)
        plrs[i].Character.Parent = workspace.Ingame
    end

This Is The How I Want To Change It But It Does Not Work And Theres A Error.


wait(3) local plrs = game.Players:GetChildren() for i = 1,#plrs do local num = math.random(1,32) plrs[i].Character.HumanoidRootPart.CFrame = CFrame.new(ReplicatedStorage.Teleporters.Teleparts["Part"..num].Position) plrs[i].Character.Parent = workspace.Ingame end

Please Help!

0
Are you sure is there a "Teleporters" parented in ReplicatedStorage? Block_manvn 395 — 4y
0
yes, im sure unless one thing but i dont think so... Christopher_magical 9 — 4y
0
what is the output error? Lightning_Game27 232 — 4y
0
Did you define Replicated Storage? Usually you would want a variable like local repStorage = game:GetService("ReplicatedStorage") iFizzics 3 — 4y
View all comments (2 more)
0
You can't get the position of the Teleporter, simply because it does not exist in the game. Putting it in ReplicatedStorage is like putting it in ServerStorage, except it can be accessed by both the client and the server. AntiWorldliness 868 — 4y
0
I Will Check Christopher_magical 9 — 4y

Answer this question