local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() mouse.Button1Down:Connect(function() print(mouse.Hit.Position) local part = Instance.new("Part", workspace) local bodyvelocity = Instance.new("BodyVelocity", part) bodyvelocity.MaxForce = Vector3.new(math.huge, math.huge,math.huge) bodyvelocity.Velocity = mouse.Hit.Position end)
Right now, if I click somewhere, it goes faster if it is further away. Any way to make it so it will always be a certain speed, lets say 200.
You can use lookVector * speed
Ex. CFrame.new(Part Position , Mouse Position).lookVector * Speed
Script
local plr = game.Players.LocalPlayer local mouse = plr:GetMouse() mouse.Button1Down:Connect(function() print(mouse.Hit.Position) local part = Instance.new("Part", workspace) local bodyvelocity = Instance.new("BodyVelocity", part) bodyvelocity.MaxForce = Vector3.new(math.huge, math.huge,math.huge) bodyvelocity.Velocity = CFrame.new(part.Position,mouse.Hit.Position).lookVector *200 end)