krutofab.blogg.se

Origin stuck at 0
Origin stuck at 0








origin stuck at 0

RightShoulder = newChar.Torso:FindFirstChild("Right Shoulder") Plr.CharacterAdded:Connect(function(newChar) Neck.C0 = CFrame.new(0, 1, 0) * CFrame.Angles(angleComponent + 1.55, math.pi, 0) RightShoulder.C0 = CFrame.new(1, 0.5, 0) * CFrame.Angles(angleComponent, 1.55, 0) Local angleComponent = -math.asin(( - ).Unit.Y RunService.RenderStepped:Connect(function() Local originalLeftShoulderC0 = leftShoulder.C0 Local originalRightShoulderC0 = rightShoulder.C0 reset the c0s to these once u stop the renderstepped Local neck = char.Torso:FindFirstChild("Neck", true) Local leftShoulder = char.Torso:FindFirstChild("Left Shoulder") Local rightShoulder = char.Torso:FindFirstChild("Right Shoulder")

origin stuck at 0

Local char = plr.Character or plr.CharacterAdded:Wait() Local plr = game:GetService("Players").LocalPlayer Here’s the script with the above things I mentioned fixed: (apart from the r15 thing) local RunService = game:GetService("RunService") The script will stop working once the character resets.The thing I said above also applies for the character’s body parts.This is especially important because the code runs like 60 times a second. Save the math stuff in a variable instead of re-doing it every single time.Use proper variable names for the same reason as number 9.Please indent, it’ll make fixing the scripts easier for us and for yourself.You should define camera once outside of the RenderStepped connection instead of every single frame.The script won’t work for r15 characters.:connect() is deprecated, you’re supposed to use :Connect().The way you’re getting the services is deprecated, you should use :GetService.Instead of using repeat wait() until, you should use the CharacterAdded event.You don’t need a wait(1) at the top of the script, the localplayer is always there.I also noticed a couple other things with the script: To solve this, I think you should save the original cframes of the character’s motor6ds before you change them and just reset them to that once you’re done. Is there anyway to fix this, so the arms to back to normal?

origin stuck at 0

But the problem is once you disable the script, it looks like this. when you aim, we don’t use view model, we use c frame to change the arm position based of mouse position, and this happens once we enable the script. I’m currently working on a project with a couple of buds and i’m working on the guns, now.










Origin stuck at 0