What you need to do is create a script in the seat and put this code:
function onTouch(part)
if part.Parent:findFirstChild("Humanoid") ~= nil then
script["LocalScript1"].Disabled = false
end
if script.Parent:findFirstChild("SeatWeld") == nil then
script["LocalScript2"].Disabled = false
end
end
script.Parent.Touched:connect(onTouch)
Notice I have it find a localscript inside of the script. Make a localscript and name it "LocalScript1". You need to do that. Paste this into the LocalScript:
plr = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Name)
cam = game.Workspace.CurrentCamera
cam.CameraType = "Custom"
plr.CameraMode = Enum.CameraMode.LockFirstPerson
script.Disabled = true
Since I have the script in the seat find a second localscript, make a second localscript into the main script and name it LocalScript2. It should look like this:
Have this code in LocalScript2:
plr = game.Players:GetPlayerFromCharacter(script.Parent.Parent.Name)
cam = game.Workspace.CurrentCamera
cam.CameraType = "Custom"
plr.CameraMode = Enum.CameraMode.Classic
script.Disabled = true
It's a bit lengthy and not the best way to do it, but this will work.
2 comments
Ahh, I thought you were talking about a normal seat prior to this question, in which I went and tested and found that false. Sorry about that.
Ah well, it's OK, you're not the only one to mark the posts as a duplicate. At least this one got through.