Hey there! so, i made a web swinging system and i realized when i web swing, it looks like im just flying to others because its all in one local script.
So, i made it server sided as you can see here:

but it doesn’t work as i want it to, it lags whenever i web swing for some reason but it doesn’t with client.
Also, another bug is that randomly when i let go of mouse, it detects that i let go of mouse but unless i click and let go (again) it won’t remove the rope.
client: https://gyazo.com/199b65dc8c0c7bf3f80fd01d5f57fce5
server: https://gyazo.com/5db3540258ff64837937814124a770fb
(when receiving the remote event, i just set the variables: Able,plr,Target and Hit)
server script
task.spawn(function() --so server can still receive remotes (writing this comment, now i realized i can just put the remote above but im not doing it cuz it might mess up the code, i'll leave it up to the forums and if i can find a solution while waiting for a response.
while task.wait() do
if Hit and Target and plr then
local Point = plr.Character["HumanoidRootPart"]
local Point2 = plr.Character["Right Arm"]
if Target and Able and Rope == nil and Target:IsA("BasePart") and (Hit.p - Point.Position).Magnitude < MD then
Rope = Instance.new("RopeConstraint", workspace)
Rope.Color = BrickColor.new("White")
Rope.Visible = true
Rope.Thickness = 0.2
local WeldPart = Instance.new("Part",Rope)
WeldPart.Transparency = 1
WeldPart.CanCollide = false
local Weld = Instance.new("Weld",WeldPart)
Weld.Part0 = WeldPart
Weld.Part1 = Point2
P2 = Instance.new("Attachment",Target)
P1 = Instance.new("Attachment",WeldPart)
P1.WorldPosition = Vector3.new(WeldPart.Position.X,WeldPart.Position.Y,WeldPart.Position.Z)
P2.WorldPosition = Hit.p
local Pos = P2
Rope.Attachment0 = P1
Rope.Attachment1 = P2
Rope.Length = (P1.WorldPosition - P2.WorldPosition).Magnitude + 1.2
if not Point:FindFirstChild("BodyForce") then
plr.Character.Humanoid.Jump = true
F = Instance.new("BodyForce")
F.Parent = plr.Character.HumanoidRootPart
local Fpos = cam.CFrame.LookVector * Vector3.new(AmountOfForce,50,AmountOfForce)
F.Force = Fpos
--F.Force = cam.CFrame.LookVector * force
end
end
if F ~= nil then
if F.Name ~= nil then
local Fpos = cam.CFrame.LookVector * Vector3.new(AmountOfForce,50,AmountOfForce)
F.Force = Fpos
--F.Force = cam.CFrame.LookVector * force
end
else
if game.Workspace:FindFirstChild("RopeConstraint") then
game.Workspace.RopeConstraint:Destroy()
Rope:Destroy()
Rope = nil
P1:Destroy()
P2:Destroy()
end
end
if Able == false and F ~= nil and game.Workspace:FindFirstChild("RopeConstraint") then
game.Workspace.RopeConstraint:Destroy()
Rope = nil
F:Destroy()
F = nil
end
end
end
end)
Thanks!!