|
| 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 |
|
|
| |
|
MXrcr20
|
  |
| Joined: 01 Oct 2008 |
| Total Posts: 2644 |
|
|
| 26 Aug 2011 10:20 PM |
Noob = game.Workspace.Noob backup = Noob:clone() |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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 |
|
|
|
| 26 Aug 2011 10:30 PM |
First line: do this:
model = game.Workspace.Noob |
|
|
| Report Abuse |
|
|
| |
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
| |
|
| |
|
| |
|
| |
|
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 |
|
|