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
 

Can someone tell me a script that..

Previous Thread :: Next Thread 
Eriknelson11 is not online. Eriknelson11
Joined: 17 Jul 2009
Total Posts: 8169
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
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
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
Eriknelson11 is not online. Eriknelson11
Joined: 17 Jul 2009
Total Posts: 8169
10 Sep 2013 12:49 PM
I don't see a :remove() or destory()
Report Abuse
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
10 Sep 2013 01:29 PM
Send me the script please?
Report Abuse
Eriknelson11 is not online. Eriknelson11
Joined: 17 Jul 2009
Total Posts: 8169
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 is not online. 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
killajake25 is not online. killajake25
Joined: 31 Jan 2011
Total Posts: 1713
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
Eriknelson11 is not online. Eriknelson11
Joined: 17 Jul 2009
Total Posts: 8169
10 Sep 2013 01:33 PM
So remove that "model:remove()" Thing from the script?
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
10 Sep 2013 01:35 PM
yes
that is what he said
Report Abuse
Eriknelson11 is not online. Eriknelson11
Joined: 17 Jul 2009
Total Posts: 8169
10 Sep 2013 01:36 PM
Okay thank you.


Didn't need to be a little hostile on that last post.
Report Abuse
janthran is not online. janthran
Joined: 15 May 2009
Total Posts: 17429
10 Sep 2013 01:39 PM
I'm not a fan of redundancy.
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