local UniformPanel = game.ReplicatedStorage["Uniform Panel"]
local Event = UniformPanel["Belt Clip"]
local Vest = UniformPanel.Components.BeltClip
function WeldParts(part0,part1)
local newWeld = Instance.new("Weld")
newWeld.Part0 = part0
newWeld.Part1 = part1
newWeld.C0 = CFrame.new()
newWeld.C1 = part1.CFrame:toObjectSpace(part0.CFrame)
newWeld.Parent = part0
end
Event.OnServerEvent:Connect(function(player, id)
local Character = player.Character
local Torso = Character:WaitForChild("Torso")
if player.Character:FindFirstChild("BeltClip") then
player.Character:FindFirstChild("BeltClip"):Destroy()
end
if not player.Character:FindFirstChild("Beltclip") then
local g = Vest:Clone()
g = player.Character
g:SetPrimaryPartCFrame(Torso.CFrame)
g.PrimaryPart:Destroy()
for _, part in pairs (g:GetChildren()) do
if part:IsA("BasePart") then
WeldParts(Torso, part)
part.CanCollide = false
part.Anchored = false
end
end
g.Parent = Character
end
end)
Anyone able to help:
- I'm trying to make a Lanyard Equip Script using RemoteEvents.
- When I hit the GUI Button it's attached too, It kills me instantly.
- 0 Errors from what I can see in Output
What I need help with:
- Fixing my Script so the Lanyard actually gets equip
- Fixing my Script so it doesn't kill me instantly!
