Hi so im basically creating my own First Person gun system that is non viewmodel and im trying to create an ADS function for it but im genuinely lost and i dont know how to. Here is a bit more detail of how i want to create ADS, there is a part within the Tool named “AimPart” which is the part that I want the camera to have the same cframe as but i dont want to move the cameras cframe i want to move the whole gun and arms to align the AimPart with the cameras cframe (IM SORRY IF THIS SOUNDS CONFUSING IM STOOPID IK). Also, the handle of the gun doesnt use the regular grip to join the handle to the right arm, i have script that removes that weld and instead i use Motor6D to join the Handle to the Right Arm whenever the tool is equipped, this is so i can animate the Handle of the gun.
I don’t really get what your saying but I think you can put an IK control on the arm and the gun, then create a part that you can lerp the gun towards.
Here is a video of my gun system, it is a gun system that does NOT use a viewmodel and is First Person. My problem is that I want to implement an ADS/aiming feature so I can actually aim with the gun when im in first person but I am not sure how to do it since it is non-viewmodel.
External Mediahave you found a solution yet? im currently in the same problem
nope, i suck with working with camera systems its all mathematical equations and i just dont understand them, but ill let you know if i find something!
what i would try is adding a offset value in a numbervalue and insert it in the gun and try making the viewmodel postion itself there
its not a viewmodel? i can easily make ADS with viewmodel guns since there are 100s of tutorials but i cannot do/say the same about non-viewmodel
Why can’t you just create an animation to ADS and tween the players FOV? If the gun has a scope you could add a viewport frame inside the scope model as a surface gui and tween the camera as close as possible to it. Or create a screen gui that looks like a scope.
you could apply an offset to the camera cframe you are using to calculate the arms’ position on the screen
I had this issue a while ago when working on my own gun system. What I opted to do as a method to not use a separate weapon model was to create a CameraPart that moves to the Player’s camera using renderstepped, and welding the gun to the Camerapart via the AimPart.
The more difficult thing left was to move the arms, but that was too difficult especially when making the arms compatible with my animations and torso rotation, so I instead made fake arms by cloning the player’s arm parts into a separate character model with its own humanoid and a clone of the Shirt to perfectly imitate the original arms of the player. I then finally welded the fake arms to the gun itself in pre-determined locations and I am happy with the result.
yeah thats just a very inefficient way of doing it + all my animations will probably break, i am thinking of creating ADS animations instead but even then thats just unreliable and might not work (why is roblox so difficult with such a simple task
), thank you for your suggestion tho
i will try this out thank you for ur suggestion
im not sure how i would do this? mind giving like a code example or something?
This is actually pretty easy. You just need a Attachment right where you want the camera to view from. I’m using a mouse2 for the view swap.
local camera = workspace.CurrentCamera
local attachment = workspace.Part.Attachment
local uis = game:GetService("UserInputService")
local rs = game:GetService("RunService")
local holding = false
uis.InputBegan:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton2 then
holding = true
camera.CameraType = Enum.CameraType.Scriptable
end
end)
uis.InputEnded:Connect(function(input)
if input.UserInputType == Enum.UserInputType.MouseButton2 then
holding = false
camera.CameraType = Enum.CameraType.Custom
end
end)
rs.RenderStepped:Connect(function()
if holding then
camera.CFrame = attachment.WorldCFrame
end
end)
Untested … Should be pretty close to what you’re looking for…
I learned this from the Racing Template and how it can give you 4 different view points.
This: local attachment = workspace.Part.Attachment
Will be wrong in your case … you would want that in the gun itself.
Then you just use the offsets and angle to set it how you wish.