You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
Ans: I want to make a make a system similar to that of the game silent assassin link:Silent Assassin - Roblox, most Importantly not the shooting machnike but the way the camera moves on the x axis not y when the weapon is equiped. -
Wht is the issue? Include screenshots / videos if possible!
Ans: To be frank I don’t know how I would tackle this problem. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
Ans: I tried to do something with CFrame.LookAt but it stuck in one direction.
local LocalPlayer = game.Players.LocalPlayer
local Character = LocalPlayer.Character or LocalPlayer.CharacterAdded:Wait()
local Gun = script.Parent
local Camera = workspace.CurrentCamera
local Mouse = LocalPlayer:GetMouse()
local IsEquiped = false
Gun.Equipped:Connect(function(mouse)
IsEquiped = true
while IsEquiped do
Character.PrimaryPart.CFrame = CFrame.lookAt(Character.PrimaryPart.Position,Vector3.new(Mouse.X,0,Mouse.X))
task.wait()
end
end)
Gun.Unequipped:Connect(function()
IsEquiped = false
end)
Gun.Activated:Connect(function()
end)