Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how do i make car ownership suach as a lock GUI?

Asked by 10 years ago

hi im trying to make a car ownership for 1 of my games im working on ive tried and tried but it just dosent seem to work can someone help me plz

2 answers

Log in to vote
1
Answered by
Mowblow 117
10 years ago

You could use a string value and connect it to the player once they sit. Put this script in the seat. And make a stringvalue called "OwnerValue" In the seat too.

local seat = script.Parent
local ownervalue = seat.OwnerValue

seat.ChildAdded:connect(function(child)
if child:IsA("Weld") and child.Name == "SeatWeld" then
local character = child.Part1.Parent
local player = game.Players:GetPlayerFromCharacter(character)
ownervalue.Value = player.Name

end
end)

Hope this helped! PM me @Mowblow on roblox for more help!

Ad
Log in to vote
-1
Answered by 10 years ago

You could use values??

Answer this question