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 » Scripters
Home Search
 

Re: Regen Problems

Previous Thread :: Next Thread 
MaraneIIo is not online. MaraneIIo
Joined: 15 Feb 2015
Total Posts: 173
08 Aug 2015 03:13 PM
Okay, so I have a regen system for a vehicle.

It works fine, but it's just that a script in the car won't regen along with the rest of the car.

Anything I could do to fix it?
Report Abuse
gangman67 is not online. gangman67
Joined: 04 Jun 2011
Total Posts: 798
08 Aug 2015 03:23 PM
paste the script please
Report Abuse
MaraneIIo is not online. MaraneIIo
Joined: 15 Feb 2015
Total Posts: 173
08 Aug 2015 05:39 PM
Okay, here it is.

local passId = 216636024

function isAuthenticated(player)
return game:GetService("GamePassService"):PlayerHasPass(player, passId)
end

game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
print(plr.Name .. "has bought the game pass with id " .. passId)
else
print(plr.Name .. "has NOT bought the game pass with id " .. passId)
local Seat = script.Parent

Seat.ChildAdded:connect(function( PlayerWeld )

if ( PlayerWeld:IsA'Weld' and PlayerWeld.Name == 'SeatWeld' ) then

local PlayerCharacter = PlayerWeld.Part1.Parent
if PlayerCharacter then
local Player = game:service'Players':GetPlayerFromCharacter( PlayerCharacter );
if not isAuthenticated( Player ) then
local Humanoid = PlayerCharacter:WaitForChild( 'Humanoid' );
if Humanoid then
wait(1/10)
PlayerWeld:Destroy();
else
end
end
end
end
end)
end
end)
Report Abuse
MaraneIIo is not online. MaraneIIo
Joined: 15 Feb 2015
Total Posts: 173
08 Aug 2015 05:40 PM
The script makes you jump up out of the seat.

I found that it does regen with the car, but the script doesn't work in the regened car.
Report Abuse
MaraneIIo is not online. MaraneIIo
Joined: 15 Feb 2015
Total Posts: 173
08 Aug 2015 05:46 PM
b1
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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