|
| 10 Sep 2013 12:32 PM |
Will keep a vehicle from respawn from a player.
Like if i have a car. And someone presses the respawn button i don't want the car to go away.
Does anybody have a script for that.
(Plus i am sorry for asking these kind of questions, I am a noob in scripting) |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 12:46 PM |
There's probably something in the Regen script. Look around in there for a :remove() or :destroy()
For easier searching, use the Ctrl-f function. |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 12:49 PM |
| I don't see a :remove() or destory() |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 01:29 PM |
| Send me the script please? |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 01:29 PM |
model = script.Parent.Parent--Indicates that the script interacts with the model the button is grouped with. messageText = ""--If you want a message to appear upon pressing, type it here.
message = Instance.new("Message") message.Text = messageText backup = model:clone() enabled = true
function regenerate() message.Parent = game.Workspace model:remove()
wait(0.1)--Change this number to display the regen message as long as you want in seconds.
model = backup:clone() model.Parent = game.Workspace model:makeJoints() message.Parent = nil
script.Disabled = true script.Parent.BrickColor = BrickColor.new(26)--Black wait(2)--Change this number to change the time in between regenerations via the button, in seconds.. script.Parent.BrickColor = BrickColor.new(104)--Purple script.Disabled = false end
function onHit(hit) if (hit.Parent:FindFirstChild("Humanoid") ~= nil) and enabled then regenerate() end end
script.Parent.Touched:connect(onHit)
(DONE) |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 10 Sep 2013 01:32 PM |
function regenerate() message.Parent = game.Workspace model:remove()--right there |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 01:33 PM |
function regenerate() message.Parent = game.Workspace model:remove()
What janthran said, just get rid of the model:remove() |
|
|
| Report Abuse |
|
|
|
| 10 Sep 2013 01:33 PM |
| So remove that "model:remove()" Thing from the script? |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
| |
|
|
| 10 Sep 2013 01:36 PM |
Okay thank you.
Didn't need to be a little hostile on that last post. |
|
|
| Report Abuse |
|
|
janthran
|
  |
| Joined: 15 May 2009 |
| Total Posts: 17429 |
|
|
| 10 Sep 2013 01:39 PM |
| I'm not a fan of redundancy. |
|
|
| Report Abuse |
|
|