Answer
You can not fix mouse position because mouse position is not a property in Roblox. You can get the mouse position with the following code:
local mousePosition = game.Players.LocalPlayer:GetMouse().Hit
local mouseRay = workspace.CurrentCamera:ViewportPointToRay(mousePosition.X, mousePosition.Y)
local mouseTarget = mouseRay.Origin + mouseRay.Direction * 9999
This will give you a vector3 that you can use to shoot at.
Answer
The following script will work best for you, it will give you a ray and give you a result.
local MousePos = UIS:GetMouseLocation()
local Ray_ = workspace.CurrentCamera:ViewportPointToRay(MousePos.X, MousePos.Y)
local RayResult = workspace:Raycast(Ray_.Origin, Ray_.Direction * 2000)
if RayResult then
script.Shoot:FireServer(Tool.Name, {X = RayResult.Position.X; Z = RayResult.Position.Z; Y = RayResult.Position.Y})
end
I hope this script will help you out.
Answer
local mouse = game.Players.LocalPlayer:GetMouse()
local target = mouse.Target
local mouseRay = workspace.CurrentCamera:ViewportPointToRay(mouse.X, mouse.Y)
local mouseTarget = mouseRay.Origin + mouseRay.Direction * 9999
local mousePosition = mouseRay.Origin + mouseRay.Direction * mouse.Hit.magnitude
if target and target:IsA(“BasePart”) then
mousePosition = target.Position
end
This should work a lot better for you.
How do I make a game like Bloxburg but with a different name for it?
Answer
I’m not sure what you mean, but, if you mean something like this, you can use a tool named “Game Explorer”.
With the tool, you can check out the properties, scripts, and other things related to the game.
All you need is a tool like this and a vast knowledge of Lua, which you can gain by searching the web for tutorials and reading the wiki.
However