generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Scripting lessons on how to make a Holo;

Previous Thread :: Next Thread 
Harple is not online. Harple
Joined: 08 Oct 2012
Total Posts: 2006
08 Jul 2015 08:24 AM
So, I know how to do the basic,

part = script.Parent

part.Touched:connect(funtion()
Map = game.Lighting.Map:Clone()
Map.Parent = game.Workspace
end)

But, I wanna learn how to have maps load with a command, rather than stepping on a brick.
Report Abuse
Alyte is not online. Alyte
Joined: 24 Oct 2011
Total Posts: 10090
08 Jul 2015 08:47 AM
X88B88 MAGIC
Report Abuse
ImperialOutcast is not online. ImperialOutcast
Joined: 24 Nov 2009
Total Posts: 12054
08 Jul 2015 09:06 AM
function load(MapName)
game:GetService("ReplicatedStorage"):FindFirstChild(MapName).Parent = game.Workspace
end

function end(MapName)
game.Workspace:FindFirstChild(MapName).Parent = game:GetService("ReplicatedStorage")
end

load("Map")
end("Map")

Wallah, two functions to load and unload. I suggest you make your own event.
Report Abuse
Alyte is not online. Alyte
Joined: 24 Oct 2011
Total Posts: 10090
08 Jul 2015 09:14 AM
UU cant cal A Function End() Kid.
Report Abuse
ImperialOutcast is not online. ImperialOutcast
Joined: 24 Nov 2009
Total Posts: 12054
08 Jul 2015 09:19 AM
Shhh i'm messing with his head.....








If he's smart he'll know how to code and not be just asking for a script..... I want him to have it broken muahhaha.
Report Abuse
Harple is not online. Harple
Joined: 08 Oct 2012
Total Posts: 2006
08 Jul 2015 09:32 AM
oi vie....

dango. dango. lionbaita's otaku maid
Report Abuse
AkxKaxXa is not online. AkxKaxXa
Joined: 12 Sep 2013
Total Posts: 72
08 Jul 2015 09:33 AM
it seems simple so i came up with this (store maps in ServerStorage):

local t = {
connections = {},
admins = {33052995, -1}, -- I tested in studio
}

function checkIfInTable(player)
for i, userId in pairs(t.admins) do
if userId == player.userId then return true end
end
end

function onChatted(msg, speaker)
if msg:sub(1, 6):lower() == '/load ' then
local mapName = msg:sub(7) if mapName == "" then return end
local map = game.ServerStorage:FindFirstChild(mapName)
if not map then return end
local clone = map:Clone()
clone.Parent = game.Workspace
clone:MakeJoints()
elseif msg:sub(1, 7):lower() == '/clear ' then
local mapName = msg:sub(8) if mapName == "" then return end
if workspace:FindFirstChild(mapName) then
workspace[mapName]:Destroy()
end
end
end

game.Players.PlayerAdded:connect(function(player)
if checkIfInTable(player) then
t.connections[player.userId] = player.Chatted:connect(function(msg)
print(msg)
onChatted(msg, player)
end)
end
end)

game.Players.PlayerRemoving:connect(function(player)
if t.connections[player.userId] then
t.connections[player.userId]:disconnect()
end
end)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image