Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I disable a seat for the player only?

I'm making a car and want only the owner to be able to drive it. I put a string value called 'Owner' inside the seat, the value of that is the owner. I then tried to deactivate the seat for the player if they were not the owner using a local script.

Is there some kind of issue regarding the local script?

script.Parent.Parent.Changed:Connect(function()
	local plr = game.Players.LocalPlayer
if plr.Name == script.Parent.Owner.Value then
	script.Parent.Disabled = false
else
		script.Parent.Disabled = true
end
end)

Thanks!

1 comment

0

maybe this could help you: https://scriptinghelpers.org/questions/100415/how-can-i-make-it-so-that-only-a-certain-player-can-sit-on-a-seat#92762 and make sure it's a server script inside the seat.

1 answer

✓ Accepted answer

You can't put LocalScript inside the seat like that. put LocalScript in PlayerScript and locate the seat and disabled it

This discussion is preserved as it was. New answers, comments, and votes are closed.