Hi
So, I've been scripting this dynamic crosshair, but when I shoot the vertical crosshairs go to the centre of the screen.
(https://youtu.be/-BisrQbaflY)
local crosshairAimTweenInfo = TweenInfo.new(gunStats.crosshairSpeed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, true, 0)
for i,v in pairs(crosshairFrame:GetChildren()) do
if v.Name ~= "Center" then
if string.find(v.Name, "H") then
if string.find(v.Name, "L") then
local crosshairTween = tweenService:Create(v, crosshairAimTweenInfo, {Position = UDim2.new(0, -50 - 7, v.Position.Y)})
crosshairTween:Play()
else
local crosshairTween = tweenService:Create(v, crosshairAimTweenInfo, {Position = UDim2.new(0, 50, v.Position.Y)})
crosshairTween:Play()
end
elseif string.find(v.Name, "V") then
if string.find(v.Name, "D") then
local crosshairTween = tweenService:Create(v, crosshairAimTweenInfo, {Position = UDim2.new(v.Position.X, 0, 50)})
crosshairTween:Play()
else
local crosshairTween = tweenService:Create(v, crosshairAimTweenInfo, {Position = UDim2.new(v.Position.X, 0, -50 - 7)})
crosshairTween:Play()
end
end
end
end
-- will run every fire() function
