Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my character fling when equipping tool that moves with the camera?

Asked by 3 years ago

So I'm making a tool that moves with the camera, that works fine, you look up and down and it follows where you look, but when you look anywhere, the character glitches and flies everywhere, shown in the video below.

https://vimeo.com/547219027

I'm thinking it's some sort of collision issue, but my handle and model aren't cancollide and the handle is massless. I checked multiple other people with a similar question, but it didn't help.

This is the code that makes the model move with the camera, I don't know what to change about it in order to fix it, I tried multiple things, changing pieces, removing bits, etc.

game.Workspace.CurrentCamera.Changed:Connect(function()
        script.Parent.Handle.CFrame = game.Workspace.CurrentCamera.CFrame + game.Workspace.CurrentCamera.CFrame.LookVector*4
    end)

If any clarification is needed, I'd be happy to clarify.

0
Maybe turn off AutoRotate on the character's Humanoid (use remote events) CoolBlueJay000 48 — 3y
0
Didn't work, the player still flings everywhere. Epicyoutube65 -5 — 3y

Answer this question