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
|
  |
| Joined: 04 Jun 2011 |
| Total Posts: 798 |
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 15 Feb 2015 |
| Total Posts: 173 |
|
| |
|