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 11 days ago
Edited 11 days 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 712 — 11d
0
Enums don't work that way... MCAndRobloxUnited 1517 — 11d

1 answer

Log in to vote
0
Answered by 11 days 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. MCAndRobloxUnited 1517 — 11d
Ad

Answer this question