Here is the r15 script
Please try this and tell me quick
repeat task.wait() until game:IsLoaded()
local camera = game.Workspace.Camera
local Players = game:GetService("Players")
local Rs = game:GetService("RunService")
local UIS = game:GetService("UserInputService")
local CS = game:GetService("ContextActionService")
local Player = Players.LocalPlayer
local Charecter:Model = Player.Character
local Head:Part = Charecter:WaitForChild("Head")
local Torso:Part = Charecter:WaitForChild("UpperTorso")
local Neck:Motor6D = Head:WaitForChild("Neck")
local Humanoid:Humanoid = Charecter:WaitForChild("Humanoid")
local HumanoidRootPart:Part = Charecter:WaitForChild("HumanoidRootPart")
local Mouse = Player:GetMouse()
Humanoid.AutoRotate = false
local Dead = false
camera.CameraType = Enum.CameraType.Scriptable
camera.FieldOfView = 120
local Offfset = 1.2 --Mess With this value the more you add to this number it becomes oriented to the right if negative oriented to the left
local currentxoffset = Offfset
local HelmetPositonLoop
local InputConnection
local MouseConneciton
HelmetPositonLoop = Rs.RenderStepped:Connect(function()
camera.CFrame = (Head.CFrame * CFrame.new(Vector3.new(currentxoffset, 0.5, 0.6)))
UIS.MouseBehavior = Enum.MouseBehavior.LockCenter
end)
local CurrentXDelta = 0
local CurrentYDelta = 0
local NeckCahce = Neck.C0
function MouseMoved(actionName:string, inputState, inputObject:InputObject)
local Neckc0Store:CFrame = Neck.C0
local CompressedDelta:Vector2 = Vector2.new(inputObject.Delta.X,inputObject.Delta.Y)
CurrentXDelta = CompressedDelta.X
CurrentYDelta = CompressedDelta.Y
HumanoidRootPart.CFrame = HumanoidRootPart.CFrame:Lerp(HumanoidRootPart.CFrame * CFrame.Angles(0, -math.rad(CurrentXDelta/2), 0),1)
local RotationX, RotationY, RotationZ = Neckc0Store:ToEulerAnglesXYZ()
local NewRotX = math.deg(RotationX+ -CurrentYDelta/200)
NewRotX = math.clamp(NewRotX,-85,65)
Neck.C0 = Neck.C0:Lerp(CFrame.new(Neckc0Store.Position)*CFrame.Angles(math.rad(NewRotX),RotationY,RotationZ),1)
end
MouseConneciton = CS:BindAction("MouseMoved",MouseMoved,false,Enum.UserInputType.MouseMovement)
InputConnection = UIS.InputBegan:Connect(function(input:InputObject,GPE:boolean)
if GPE then return end
local Keycode = input.KeyCode
if Keycode == Enum.KeyCode.Q and currentxoffset ~= -Offfset then
currentxoffset = -Offfset
end
if Keycode == Enum.KeyCode.E and currentxoffset ~= math.abs(Offfset) then
currentxoffset = math.abs(Offfset)
end
--print(currentxoffset)
end)
Humanoid.Died:Connect(function()
if Dead == true then return end
Dead = true
InputConnection:Disconnect()
CS:UnbindAction("MouseMoved")
task.wait(Players.RespawnTime)
HelmetPositonLoop:Disconnect()
end)
Real qucik if this one dosnt work send me a screenshot of the explorer when the project is ran and when the project is not ran to see if acs has named things to different names
Thanks for telling me about it! I tested it with one of the ragdolls with the toolbox, and this time, it works, even though the head shakes a lot lol! One more thing! How can I make it so the arms can also move as well? Much like the new Roblox game Hellmet!
When both are put together they add the permenant sway
Link to the reference
Fakemouse variables are the mouse deltas that are saved in two seperate variables i reccomend you save it in a vector 2 but both work flawlessley Also like @clvmbrew Had said the springy sway is the one hellmet has when you move and it makes a little rebound!
Sorry for any spelling english is not my primary. Good day
Headcframe * cframe.new(vector3.new(0,-5,0)) --random numbers
Tahts the basics of it
Get the cframe of the head multiply it by a cframe.new
inside that cframe.new
Put a new vector3
and inside label the offset you want based off the x y z
If you got any other question then ask away
I think I might be able to pull it off. There is a script that a favorite creator I like, who also made the FE Gun Kit, shows your arms in first person and moves very smoothly like sway arms kind of, and he also made the updated/current FE Gun Kit to have a ViewModel for 3rd person, so yeah, I might be able to do it! Thanks for some tips, and massive thanks for the script! You are the best!
Might be a studio bug i have no idea they have been releasing alot of updates but if it works ingame and its just in studio than its just a studio bug i just repeated myself