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 » Scripting Helpers
Home Search
 

Re: This script only works once?

Previous Thread :: Next Thread 
romaster512 is not online. romaster512
Joined: 13 Mar 2009
Total Posts: 1250
23 Jul 2012 01:01 AM
When I "render" the map up, wait a bit, "de-render" it, wait a bit, and try to "render" it again, it doesn't work.


Admins = {"romaster512"}

Model = game.Lighting.Oldmap:clone()
Render = script.Parent.Render
game.Players.PlayerAdded:connect(function(plyr)
for a, b in pairs(Admins) do
if b == plyr.Name then
plyr.Chatted:connect(function(msg)
if msg == "RenderOldmap" and Render.Value == false then
Model.Parent = game.Workspace
wait(0.5)
Render.Value = true
elseif msg == "DeRenderOldmap" and Render.Value == true then
game.Workspace.Oldmap:Destroy()
wait(0.5)
Render.Value = false
end
end)
end
end
end)


I'm not sure what's going wrong. Help?

Thanks in advance.
Report Abuse
romaster512 is not online. romaster512
Joined: 13 Mar 2009
Total Posts: 1250
23 Jul 2012 01:08 AM
le bump
Report Abuse
romaster512 is not online. romaster512
Joined: 13 Mar 2009
Total Posts: 1250
23 Jul 2012 01:27 AM
No one? I thought this was a pretty basic script..
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
23 Jul 2012 01:45 AM
while wait(0.5)
Model = game.Lighting.Oldmap:clone()
Render = script.Parent.Render
game.Players.PlayerAdded:connect(function(plyr)
for a, b in pairs(Admins) do
if b == plyr.Name then
plyr.Chatted:connect(function(msg)
if msg == "RenderOldmap" and Render.Value == false then
Model.Parent = game.Workspace
wait(0.5)
Render.Value = true
elseif msg == "DeRenderOldmap" and Render.Value == true then
game.Workspace.Oldmap:Destroy()
wait(0.5)
Render.Value = false
end
end)
end
end
end)
end
Report Abuse
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
23 Jul 2012 01:45 AM
oops, forgot something

while wait(0.5) do
Model = game.Lighting.Oldmap:clone()
Render = script.Parent.Render
game.Players.PlayerAdded:connect(function(plyr)
for a, b in pairs(Admins) do
if b == plyr.Name then
plyr.Chatted:connect(function(msg)
if msg == "RenderOldmap" and Render.Value == false then
Model.Parent = game.Workspace
wait(0.5)
Render.Value = true
elseif msg == "DeRenderOldmap" and Render.Value == true then
game.Workspace.Oldmap:Destroy()
wait(0.5)
Render.Value = false
end
end)
end
end
end)
end
Report Abuse
romaster512 is not online. romaster512
Joined: 13 Mar 2009
Total Posts: 1250
23 Jul 2012 12:26 PM
Thanks!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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