I don't Know what do to with Mouse position so I left the Position checker
if Mouse.Position > 500 then end.
-- Variables --
local replicated = game:GetService("ReplicatedStorage")
local player = game:GetService("Players").LocalPlayer
local Remote = game.ReplicatedStorage.RemoteEvents:WaitForChild("Lightning")
local UserInputService = game:GetService("UserInputService")
local humanoid = player.Character:WaitForChild("Humanoid")
Mouse = player:GetMouse()
Debounce = true
wait(1)
UserInputService.InputBegan:Connect(function(input, gameProcessed)
if gameProcessed then return end
if input.UserInputType == Enum.UserInputType.MouseButton1 then
if Mouse.Position > 500 then end
else
player.Character:MoveTo(Mouse.Hit.p)
end
end)
