local plr = game.Players.LocalPlayer
local char = plr.Character
local hum = char:WaitForChild("Humanoid")
local humrp = char:WaitForChild("HumanoidRootPart")
local Mouse = plr:GetMouse()
local UIS = game:GetService("UserInputService")
local IsAir = false
local replicatedStorage = game:GetService("ReplicatedStorage")
local ropeEvent = replicatedStorage:WaitForChild("RopeEvent")
--// Arm Stuff
local LeftArm = char:WaitForChild("Left Arm")
local RightArm = char:WaitForChild("Right Arm")
local charAttach = Instance.new("Attachment", humrp)
charAttach.Name = "SilkAttachment"
----------------------------------------------------------------------
function WebShoot(hit,target)
local dupe = target:FindFirstChild("buildingAttachment")
if target == nil then return end
if hit == nil then return end
---------------- Create Attachment
local BuildingAttachment = Instance.new("Attachment")
if target:FindFirstChild("buildingAttachment") then
dupe:Destroy()
end
BuildingAttachment.Name = "buildingAttachment"
BuildingAttachment.CFrame = target.CFrame:ToObjectSpace(hit)
BuildingAttachment.Parent = target
BuildingAttachment.Visible = true
-----------------------------------
local dupe2 = game.Workspace:FindFirstChild("Silk")
local Web = Instance.new("RopeConstraint")
Web.Name = "Silk"
Web.Length = 3 --(humrp.Position - BuildingAttachment.WorldPosition).Magnitude i changed your script like this so don't change this part
Web.Visible = true
Web.Color = BrickColor.new("Really black")
Web.Thickness = 0.15
Web.Restitution = 1
Web.Parent = humrp
Web.Attachment0 = BuildingAttachment
Web.Attachment1 = charAttach
end
UIS.InputBegan:Connect(function(input, gameProccessed)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
WebShoot(Mouse.Hit, Mouse.Target)
end
end)
while wait(5) do
charAttach.WorldPosition = LeftArm.LeftGripAttachment.WorldPosition
end
But it’s not complete yet i mean the dupe system, for example if u try to cast another rope on another wall it’s going to be glitchy i didn’t work on that
it’s a good thing then but make sure to make a anti dupe function so it won’t be glitchy
i mean a system that prevents from casting multi ropes on a single object
Hey I really like your web swing script but I wanted to ask what would I have to do so that every time the user clicks the space bar the web line part disappears.