I have some basic ideas for instance :
if script.Parent.Throttle == 1 then value = value +1 end
if script.Parent.Throttle == 1 then value = value +1 end
But I don't know how to find the value as it's player specific...
I have never used data persistence so please dumb it down.
Thanks,
Llamakid15
Sorry, I messed up an edit and lost my first bit here. If any admins are online, if you could revert this to the first version that would be fantastic.
local seat = script.Parent -- Change me to where the VehcileSeat is local statName = "Points" -- The name of the stat you want to change seat.Changed:connect(function(val) -- When a property changes if (val == "Throttle" and seat.Throttle == 1 and seat:FindFirstChild("SeatWeld")) then local sittingChar = seat.SeatWeld.Part1.Parent -- Who is sitting in the seat if (sittingChar and player.Players:FindFirstChild(sittingChar.Name)) then -- If they're a player, which they probably are. This is just a procaution game.Players[sittingChar.Name].leaderstats[statName] = game.Players[sittingChar.Name].leaderstats[statName] + 1 -- Add one to the given stat end end end)