local script:
local tool = script.Parent
local RE = game:GetService("ReplicatedStorage")
local ArmorEvent = RE.ArmorEvent
local name = "Helm"
local Atype = "Head"
tool.Activated:Connect(function()
ArmorEvent:FireServer(name,Atype)
end)
Script:
local RE = game:GetService("ReplicatedStorage")
local ArmorEvent = RE.ArmorEvent
local ArmorModel = RE.ArmorModel
local ArmorTool = RE.ArmorTool
ArmorEvent.OnServerEvent:Connect(function(plr,name,Atype)
print(name)
if Atype == "Head" then
for i, v in pairs(plr.Backpack:GetChildren()) do
if v.Name == name then
v:Destroy()
end
if name == "Helm" then
if plr.Backpack:FindFirstChild("Helm")then
end
plr.Character:WaitForChild("Humanoid").WalkSpeed = 30
local HelmModel = ArmorModel:WaitForChild("Helm")
end
if name == "Sigil" then
plr.Character:WaitForChild("Humanoid").WalkSpeed = 3
local SigilModel = ArmorModel:WaitForChild("Sigil")
local weld = Instance.new("WeldConstraint",SigilModel.PrimaryPart)
local head = plr.Character:WaitForChild("Head")
weld.Part0 = head
weld.Part1 = SigilModel.PrimaryPart
end
end
end
end)
The issue im having with this code is that it just doesnt get rid of the item that activated the remote event. I tried fixing it but rather then working (as intended) it got rid of all other items beside the helmet tool i activated. Any feedback will be nice