I'm making a bow and arrow for my game, but I can't get the mouse to lock like it does in first person. I've tried:
tool.Equipped:Connect(function(mouse)
game:GetService('RunService').RenderStepped:Connect(function()
mouse.MouseBehavior = Enum.MouseBehavior.LockCenter
end)
end)
That works, but I have to hold right click in order to move my camera. If I do it without RenderStepped it teleports the mouse to the center of the screen but doesn't lock it.
I've also tried one that includes self but apparently self is nonexistent. I've looked on Google and YouTube, but can't find anything up-to-date.

1 comment
self is a keyword that only exists in methods (method is a function that uses :, as module:fire()). Now, I think making your own one would fit better, this is an useful post: https://devforum.roblox.com/t/camera-coding-setting-the-offset/111529/5