Camera-following flashlight

Nevermind, I made this and it works just how I want it to:

--The "axis" being the camera.CFrame.LookVector.Y
script.Parent.Event.OnServerEvent:Connect(function(player,axis)
	
	if player.Character and player.Character:FindFirstChild(script.Parent.Name) then
		player.Character.Torso["Right Shoulder"].C0 = CFrame.new(player.Character.Torso["Right Shoulder"].C0.Position) * CFrame.Angles(0,math.rad(90),math.rad(axis*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)

Im going to be posting this solution onto the Community Tutorials page, because I haven’t seen any solutions like mine.

1 Like