Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
0

Why is this simple and small camera mode script not working?

Asked by 2 months ago
Edited 2 months ago

--1 is LockFirstPerson and 0 is Classic

player = game.Players.LocalPlayer mouse = player:GetMouse()

mouse.KeyDown:connect(function(key) if key == "b" then if player.CameraMode == 1 then mouse.Icon = 'http://www.roblox.com/asset/?id=950896037' player.CameraMode = 0 elseif player.CameraMode == 0 then mouse.Icon = 'http://www.roblox.com/asset/?id=2570571375' player.CameraMode = 1 end end end)

0
lol format pls TheluaBanana 727 — 2mo
0
Enums don't work that way... RobloxWhizYT 2026 — 2mo

1 answer

Log in to vote
0
Answered by 2 months ago

Both keydown() and connect() are deprecated, meaning you should not use them. Instead, use userinputservice or contextactionservice(https://developer.roblox.com/articles/Keyboard-Input-Methods). Instead of using connect(), use Connect()

0
That's not the problem. You should try actually looking at his code to see what is wrong. RobloxWhizYT 2026 — 2mo
Ad

Answer this question