Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I loop the Mouse position through fe?

Asked by 6 years ago
Edited 6 years ago

Im trying to loop the mouse position through fe but im having trouble what im trying to achieve is this through fe ignore the fire ball please --Server Script

local AimTesting = rs:FindFirstChild("AimTesting")
AimTesting.OnServerEvent:connect(function(p,Mouse)
    local bg = Instance.new("BodyGyro",Player.Character.HumanoidRootPart)
bg.D = 50
bg.MaxTorque = Vector3.new(math.huge,math.huge,math.huge)
for i = 1,50 do wait()
    bg.CFrame = CFrame.new(p.Character.HumanoidRootPart.Position,Mouse.hit.p)
end

--Local script

p = game.Players.LocalPlayer
Mouse = p:GetMouse()
m = game:GetService("UserInputService")
rs = game:GetService("ReplicatedStorage")
hb = game:GetService("RunService").RenderStepped
db = 1 

local AimTesting = rs:FindFirstChild("AimTesting")
m.InputBegan:connect(function(key,gpe)
    if gpe then return end
    if key.KeyCode == Enum.KeyCode.F then
AimTesting:FireServer(Mouse)
end)
0
Replace (Mouse.hit.p) to (Mouse) and in the ServerScript put Mouse.Hit.p where it says Mouse oSyM8V3N 429 — 6y
0
ok tyisdeadpool100 2 — 6y
0
it says Mouse is a nil value tyisdeadpool100 2 — 6y
0
update the script so i can read it better oSyM8V3N 429 — 6y
0
done tyisdeadpool100 2 — 6y

Answer this question