Ignore my shirt, it's offensive. Anyway, I'm trying to find a way on how to make a seat lock the player who's sitting in it into first person, I have already done this with a chat teleport script, but it gets the character by whoever says the word. I'd like to know how to do this due to the reasons of one of the groups I work as a Vice Administrator, the O5-Council in this group are slacking and are doing abusive behaviours so I thought I'd type out a document of purging the council including the O5X. I said that I'd put them through harsh torture with potential epilepsy and taser treatment. Please do not question me.
✓ ANSWER ACCEPTED
How would I make a seat lock the player who's sitting in it first person?
1 answer
✓ Accepted answer
players = game:GetService("Players")
seat = script.Parent
active = false
plr = nil
seat.ChildAdded:Connect(function(child)
if not active then
if child.Name == "SeatWeld" then
Active = true
plr = players:GetPlayerFromCharacter(child.Part1.Parent)
if plr ~= nil then
plr.CameraMode = Enum.CameraMode.Classic
wait()
plr.CameraMode = Enum.CameraMode.LockFirstPerson
end
end
end
end)
seat.ChildRemoved:Connect(function(child)
if child.Name == "SeatWeld" then
if Active == true then
Active = false
plr.CameraMode = Enum.CameraMode.LockFirstPerson
wait() -- I've did this & vice versa so that roblox doesn't mess with it, weird.
plr.CameraMode = Enum.CameraMode.Classic
end
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
