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: what did i do wrong?

Previous Thread :: Next Thread 
ImmortalMiner is not online. ImmortalMiner
Joined: 28 Jun 2011
Total Posts: 658
26 Aug 2011 10:09 PM
Noob = game.Workspace.Noob
backup = model:clone()


this is in a regen script -- if the model i want to regen when i say, 'regen' is named 'Noob' (no quotations) how would i fix this? please help! i suk at scripting
Report Abuse
ImmortalMiner is not online. ImmortalMiner
Joined: 28 Jun 2011
Total Posts: 658
26 Aug 2011 10:18 PM
BuMp O.o WaVy
Report Abuse
MXrcr20 is not online. MXrcr20
Joined: 01 Oct 2008
Total Posts: 2644
26 Aug 2011 10:20 PM
Noob = game.Workspace.Noob
backup = Noob:clone()
Report Abuse
Liir is not online. Liir
Joined: 01 Feb 2010
Total Posts: 3424
26 Aug 2011 10:20 PM
You obviously don't know anything about scripting and are just a fledgling editor.

Post the whole script and we /may/ be able to help you.
Report Abuse
ImmortalMiner is not online. ImmortalMiner
Joined: 28 Jun 2011
Total Posts: 658
26 Aug 2011 10:30 PM
full script:


Noob = game.Workspace.Noob -- Change "Model" to the name of the Model you want to Regen. NOTE: There can't be any spaces in the name.
backup = model:clone()

function onChatted(msg, recipient, speaker)

local source = string.lower(speaker.Name)
msg = string.lower(msg)

if (msg == "regen") then -- Change "regen" to what you want to say to make the Model Regen. No caps or spaces or else it won't work!
model:remove()
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
end

end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
abcdefghijklmnopqryz is not online. abcdefghijklmnopqryz
Joined: 06 Aug 2011
Total Posts: 78
26 Aug 2011 10:30 PM
First line: do this:

model = game.Workspace.Noob
Report Abuse
MacGillavry is not online. MacGillavry
Joined: 26 Jun 2011
Total Posts: 517
26 Aug 2011 10:31 PM
the free model.
it burns.
Report Abuse
abcdefghijklmnopqryz is not online. abcdefghijklmnopqryz
Joined: 06 Aug 2011
Total Posts: 78
26 Aug 2011 10:32 PM
There are nothing wrong with free models. BUT, if you happen to cross by a virus, thats your problem.
Report Abuse
MXrcr20 is not online. MXrcr20
Joined: 01 Oct 2008
Total Posts: 2644
26 Aug 2011 10:33 PM
Noob = game.Workspace.Noob -- Change "Model" to the name of the Model you want to Regen. NOTE: There can't be any spaces in the name.
backup = Noob:clone()

function onChatted(msg, recipient, speaker)

local source = string.lower(speaker.Name)
msg = string.lower(msg)

if (msg == "regen") then -- Change "regen" to what you want to say to make the Model Regen. No caps or spaces or else it won't work!
model:remove()
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
end

end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)
Report Abuse
MacGillavry is not online. MacGillavry
Joined: 26 Jun 2011
Total Posts: 517
26 Aug 2011 10:35 PM
"come across a virus"
Keep studio paused. CtrlZ.

But yeah, free models are fine, I use them to refresh my memory and stuff. I just find it weird to post it with the -- Instructions.
Report Abuse
abcdefghijklmnopqryz is not online. abcdefghijklmnopqryz
Joined: 06 Aug 2011
Total Posts: 78
26 Aug 2011 10:38 PM
I've learn't that CtrlZ only rewinds the position and edits you made, not the actual time-frame back to the before-span.
Report Abuse
EpikYummeh is not online. EpikYummeh
Joined: 05 Sep 2009
Total Posts: 1879
26 Aug 2011 10:51 PM
If you're in Edit mode, you can press the handy Reset button, but you have to remember anything you did while it was running will be lost. Undo does not work in Build mode.
Report Abuse
ImmortalMiner is not online. ImmortalMiner
Joined: 28 Jun 2011
Total Posts: 658
27 Aug 2011 08:32 AM
still not working
Report Abuse
ImmortalMiner is not online. ImmortalMiner
Joined: 28 Jun 2011
Total Posts: 658
27 Aug 2011 08:42 AM
bump

someone please help
Report Abuse
ImmortalMiner is not online. ImmortalMiner
Joined: 28 Jun 2011
Total Posts: 658
27 Aug 2011 09:00 AM
bump
Report Abuse
ImmortalMiner is not online. ImmortalMiner
Joined: 28 Jun 2011
Total Posts: 658
27 Aug 2011 09:21 AM
bump
Report Abuse
Liir is not online. Liir
Joined: 01 Feb 2010
Total Posts: 3424
27 Aug 2011 01:36 PM
MX
Learn to script before you try to help someone, k?

model = game.Workspace.Noob -- Change "Model" to the name of the Model you want to Regen. NOTE: There can't be any spaces in the name.
backup = model:clone()

function onChatted(msg, recipient, speaker)

local source = string.lower(speaker.Name)
msg = string.lower(msg)

if (msg == "regen") then -- Change "regen" to what you want to say to make the Model Regen. No caps or spaces or else it won't work!
model:remove()
model = backup:clone()
model.Parent = game.Workspace
model:makeJoints()
end

end

function onPlayerEntered(newPlayer)
newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end)
end

game.Players.ChildAdded:connect(onPlayerEntered)

@Immor
The commented text said to change the variable VALUE, not the variable's NAME.
You had changed model's name to Noob; and since the rest of the script referenced a variable that was nil/non-existent, it broke.

model = game.Workspace.Noob
-- you put:
Noob = game.Workspace.Noob

-- and did not update the rest of the script to change model to Noob.
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