-
What do you want to achieve? Keep it simple and clear!
-
What is the issue? All attempts ive tried have failed
-
What solutions have you tried so far? Repeating the code for the Y axis on the X axis
current code:
local function flashlight(player,X,Y,reset) --X and Y are lookVector X and Y
if player.Character and player.Character:FindFirstChild(script.Name) and not reset then
player.Character.Torso["Right Shoulder"].C0 = CFrame.new(player.Character.Torso["Right Shoulder"].C0.Position) * CFrame.Angles(0,math.rad(90),math.rad(Y*70))
else
player.Character.Torso["Right Shoulder"].C0 = CFrame.new(player.Character.Torso["Right Shoulder"].C0.Position) * CFrame.Angles(0,math.rad(90),0)
end
end
game.ReplicatedStorage.flashlight.OnServerEvent:Connect(flashlight)
game.ReplicatedStorage.flashlight1.OnServerEvent:Connect(flashlight)
this code only has the X axis