So basically I am making a script where, if you press C, you fly and your character flies to where your mouse is aiming for 3 seconds. But I don't know how to make so the server has constantly access to the mouse Position. Here's my local script
if input.KeyCode == Enum.KeyCode.C then
if not flightEnabled then return end
handler:FireServer({"Fire", "Flight"})
local cd = Instance.new("IntValue", player.Character)
cd.Name = "FlightCooldown"
cd.Value = 14
cooldownGui.Flight.FlightFrame.BackgroundTransparency = 0.3
for i=1, 13 do
cd.Value = cd.Value - 1
cooldownGui.Flight.FlightText.Text = cd.Value
wait(1)
end
cooldownGui.Flight.FlightText.Text = "C"
cooldownGui.Flight.FlightFrame.BackgroundTransparency = 1
cd:Remove()
flightEnabled = true
end
end)

1 comment
I don't get how this will make so the server will constantly have the renewed mouse Position