So basically, I'm trying to use Adonis's custom admin command to make a command. This command will be a setmap command, and I want a map in ReplicatedStorage to be placed in Workspace when the command is run.
To do this,
make the command copy the map to workspace.
local desired_map = nil -- Link this to your map's model desired_map = desired_map:Clone() desired_map.Parent = workspace
This should be about it, hope this is clear enough.
Hello there, i've edited a quick script for you hope it works, cheers!
function onChatted(msg, recipient, speaker) local source = string.lower(speaker.Name) msg = string.lower(msg) if (msg == "map1") then changemap("spawn") end end -- Do not edit without experience. function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered) function changemap(name) local getmap = game.Lighting[name]:Clone() getmap.Parent = workspace end
I just added the map change/spawn function the chat command script is not made by me