So i have been trying to weld a parachute to a player for the past 8 hours and gave up after many attempts.
For some reason welding the parachute to the player causes this to happen in studio.
and this ingame whenever there is serverlag
How do i weld a parachute to a player without it causing any glitches?
local Parachute = game.ReplicatedStorage.Parachute:Clone()
local Torso
Parachute.Name = Player.Name .. "Parachute"
Parachute.Parent = game.Workspace
if Player.Character:FindFirstChild("Torso") then
Torso = Player.Character.Torso
else
Torso = Player.Character.LowerTorso
end
Torso.Anchored = true
Player.Character.HumanoidRootPart.Anchored = true
Parachute:SetPrimaryPartCFrame((Player.Character.HumanoidRootPart.CFrame * CFrame.new(0,0.65,0)) * CFrame.Angles(0,0,math.rad(90)))
local Weld = Instance.new("WeldConstraint")
Weld.Name = ("ParachuteWeld")
Weld.Part0,Weld.Part1 = Player.Character.HumanoidRootPart,Parachute.WeldPart
Weld.Parent = Parachute.WeldPart
Weld.Enabled = true --the issue only appears ingame when you spam a parachute
Torso.Anchored = false
Player.Character.HumanoidRootPart.Anchored = false
for i,part in pairs(Parachute:GetChildren()) do
if part:IsA("BasePart") then
part.Anchored = false
end
end
for i,part in pairs(Player.Character:GetDescendants()) do
if part:IsA("BasePart") then
part.Anchored = false
end
end
Parachute.ParachuteScript.Parent = Player.Character