Im trying to make a shotgun in roblox studio right now, but I dont know how to make the spread. I want it to just be in one direction, since i want it to be a top- down shooter, but i dont know how to make it.
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(plr)
local humRP = plr.Character:FindFirstChild("HumanoidRootPart")
for i = -3,3 do
local part = Instance.new("Part")
part.Shape = Enum.PartType.Ball
part.CanCollide = false
part.Parent = workspace
part.Position = humRP.Position
part:ApplyImpulse((humRP.CFrame.LookVector + i*5) * 50 + Vector3.new(0,10,0))
wait(0.1)
end
end)
i tried multiplying i to get the angle, but i dont think roblox studio angles work like that. Any help would be greatly appreciated!