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

Locals scripts not working when transferring models?

I tried to make a local script that copies a model (which is a map) into the workspace as a way to change the world you're in. But I used a local script and It's still changing it for all players! So I'm trying to figure out how to use this :clone().Parent = game.Workspace code, but locally so I can make the game multiplayer again! Here is the script full script:

function OnClicked() 
for i = 1,10 do
script.Parent.Parent.Parent.Loading.BackgroundTransparency = script.Parent.Parent.Parent.Loading.BackgroundTransparency - 0.1
wait (0.01)
end
----------------------------------------------------------------
game.Workspace.WorldMaps.CurrentMap:Destroy()
wait (0.001)
local Map = game.ServerStorage.Assets.Maps.Zone_1:Clone()
Map.Parent = game.Workspace.WorldMaps
Map.Name = "CurrentMap"
wait (0.8)
----------------------------------------------------------------
for i = 1,10 do
script.Parent.Parent.Parent.Loading.BackgroundTransparency = script.Parent.Parent.Parent.Loading.BackgroundTransparency + 0.1
wait (0.01)
end
end
script.Parent.MouseButton1Down:connect(OnClicked)

And the part I need to make local is the part enclosed im brackets:

game.Workspace.WorldMaps.CurrentMap:Destroy()
wait (0.001)
local Map = game.ServerStorage.Assets.Maps.Zone_1:Clone()
Map.Parent = game.Workspace.WorldMaps
Map.Name = "CurrentMap"
wait (0.8)

If it's possible at all, I need to know if I can use this to change maps locally for different players.

1 answer

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