Why my goofy ahh gun doing this

basically my gun ain’t aiming right like bruh look at this . The aimpos is behind the iron sight, I selected to make sure.

varibles:

local AimPos = nil
local Handle = Parent:WaitForChild("ToolModel"):WaitForChild("BodyAttach")

local HandleTransform = nil
local OriginalTransform = nil
local AimTransform = nil

renderstepped (main)

if not AimPos or AimPos == nil or not AimPos:IsA("BasePart") then
			for _,v in Parent:WaitForChild("ToolModel"):GetDescendants() do
				if v.Name == "AimPos" then
					AimPos = v
				end
			end

			if not AimPos then
				return
			end
		end

		if CurrentlyAiming then
			UIS.MouseDeltaSensitivity = Player:WaitForChild("Settings"):WaitForChild("ADSSens").Value
		else
			UIS.MouseDeltaSensitivity = default
		end
		
		--calculations
			HandleTransform = workspace.CurrentCamera.CFrame:ToObjectSpace(Handle.CFrame)
			OriginalTransform = HandleTransform * HandleTransform:Inverse()
			AimTransform = AimPos.CFrame:ToObjectSpace(Handle.CFrame) * HandleTransform:Inverse()
		--calculations		

bodyattach+aimpos

imagegiga

iname
image

1 Like

my gun uses an attachment script to attach aimpos etc that’s why the aimpos is finded in renderstepped, but ther’s aimpos and handke found so the problem isn’t anything with attachment system.

3 Likes

ok I used old version of mine it worked sooo idk probably atatchment system some how

1 Like

actually I fixed it with attachment the system somehow idk

2 Likes

bro ar 15 is sped

I have dug into my game and found that the aim system bugs out whenever , it’s in an attachment modle. When I fix this I will say when I fied it

ok I FINALLY fixed it because In the aimpos check on client in renderstepped I removed the check to see if aimpos is already there and even though aimpos isn’t it still returned it was so I removed the check

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.