Projectile not shooting

what i want:

what i get:

in serverscriptservice
normal script:

local remote = game.ReplicatedStorage.Test

local clone = game:GetService("ServerStorage").Part:Clone()
remote.OnServerEvent:Connect(function(player,MouseHitPosition)
	local char = player.Character or player.CharacterAdded:Wait()
	local humrp = char:WaitForChild("HumanoidRootPart")
	local speed = 10
	local bv = Instance.new("BodyVelocity",clone)	
	clone.CFrame = CFrame.lookAt(humrp.Position,MouseHitPosition)
	bv.Velocity = clone.CFrame.lookVector * speed
	clone.Parent = workspace
	print("ok")
end)

in starterpack
local script:

-- LOCAL SCRIPT
local plr = game.Players.LocalPlayer
local remote = game.ReplicatedStorage.Test
local UserInputService = game:GetService("UserInputService")
local Mouse = plr:GetMouse()
UserInputService.InputBegan:Connect(function(input,typing)
	if  typing then return end
	if input.UserInputType == Enum.UserInputType.MouseButton1 then
		remote:FireServer(Mouse.Hit.Position)
	end
end)

please help

Please send non-downloadable videos.

1 Like

how

i have obs will that work?

Recording without the default roblox recorder. Use Gyazo for short videos.

Yes, OBS works.

there

So i believe this might be because you never parented the BodyVelocity, nor set the MaxForce to Vector3.new(1000000,100000,1000000)

local remote = game.ReplicatedStorage.Test

remote.OnServerEvent:Connect(function(player,MouseHitPosition)
	local char = player.Character or player.CharacterAdded:Wait()
	local humrp = char:WaitForChild("HumanoidRootPart")
	local speed = 10
	
	local clone = game:GetService("ServerStorage").Part:Clone()
	clone.Parent = workspace
	clone.CFrame = CFrame.lookAt(humrp.Position,MouseHitPosition)
	
	local bv = Instance.new("BodyVelocity",clone)
	bv.Parent = clone
	bv.MaxForce = Vector3.new(1,1,1) * math.huge
	bv.Velocity = clone.CFrame.lookVector * speed
	
	print("ok")
end)
1 Like

wait so vector3.new is not to teleport to a specific place?

Not only that. It is used to indicate a position. Which is exactly what you are using in BodyVelocity.Velocity

1 Like