I have a script, I edited it from a free model.. I added in the codes after it shows "e" and I changed it from (Player = script.Parent.Parent) to (Players = Players.LocalPlayer) Is that right?. Can someone please help? I want it so when someone presses E they can either toggle from FPS mode to classic and press again to change from classic to FPS. And I left the original author there to show I didn't EXACTLY create it..
Players = Players.LocalPlayer
mouse = Players:GetMouse()
function onKeyDown(key)
key = key:lower()
if Players.LocalPlayer.Open.Value == false then
if key == "e" then --start
game.StarterPlayer.CameraMode.LockFirstPerson = false
game.StarterPlayer.CameraMode.Classic = true
end
elseif Players.LocalPlayer.Open.Value == true then
if key == "e" then --E is the key to open and close
game.StarterPlayer.CameraMode.Classic = false
game.StarterPlayer.CameraMode.LockFirstPerson = true
end
end
end
mouse.KeyDown:connect(onKeyDown)
--IciFlame

1 comment
Did not work, and is in a LocalScript in starterpack.