As I see it, your script is flawed that, even if we do give an answer... it will not work with the rest of your coding... as such, i suggest you try to make it so that everything is coherent... for example:
The map is still in ServerStorage
, to move it you should use:
1 | local mapholder = Instance.new( "Model" , game.Workspace) |
2 | mapholder.Name = "CurrentMap" |
4 | game.ServerStorage.Maps.Arena |
Your map will now error because the map has a NumberValue
in a line of code that has a String
, as such you will need to use FindFirstChild()
1 | local mapholder = Instance.new( "Model" , game.Workspace) |
2 | mapholder.Name = "CurrentMap" |
4 | local mapa = game.ServerStorage.Maps:FindFirstChild( "Arena1" ) |
I could keep going on, but I will instead recommend you to some ROBLOX wiki pages that you should learn:
http://wiki.roblox.com/index.php?title=Loops
http://wiki.roblox.com/index.php?title=Function_dump/Basic_functions&redirect=no#pairs
http://wiki.roblox.com/index.php?title=API:Class/Instance/FindFirstChild
After you have done this, you should start from scratch, and attempt to create a smooth code.. if you still cannot do this, pm me on roblox (Username: Taryo)
~ Taryo
Edit:
Removed CFrame
and Vector3
from recommended list, you can still view them here:
http://wiki.roblox.com/index.php?title=CFrame
http://wiki.roblox.com/index.php?title=Vector3