I don't know how to do this, I am an amateur coder who used to raid the library in hoping of finding a script that'll help. But now that I'm using this, I can finally get help. So I want to change the camera to first person when they touch a part, but when they die, it switches back to the regular camera mode.
But I do not know how to do this, so can someone help me?
Reason being I'm trying to build a lobby and then when they get to the map, they will be stuck in first person.
Also, I'm trying to auto-equip a tool and get rid of the backpack, but I don't know how to do this either.
These are not requests, I am trying to learn more about coding because it is difficult.
you're soooo lucky its christmas eve here
the touch script
In the brick that is being touch a regular script.
script.Parent.Touch:connect(function(hit) if hit.Parent == hit.Parent:FindFirstChild("Humanoid") then game.Players[hit.Parent.Name].CameraMode = "LockFirstPerson" -- Will lock the camera end end)
A local script in starter Scripts On death change camera back
local player = game.Players.LocalPlayer wait(1) local char = player.Character char.Humanoid.Died:connect(function() if player.CameraMode == "LockFirstPerson" then player.CameraMode = "Classic" end end)
go on ROBLOX Wiki to learn how to script.
Wasn't on my pc to test it so tell me if something is wrong.