So, my remote event isn’t firing for some reason. I’ve tried multiple times, and it’s just not working. Please help me out with this, cause it’s kind of getting annoying lol
Local Script
local gui = game.Players.LocalPlayer.PlayerGui
gui.ScreenGui.TextButton.Activated:Connect(function()
game.ReplicatedStorage.TeamSwap:FindFirstChild("GnomeKingTeamSwap")
end)
Remote Event
script.Parent.GnomeKingTeamSwap.OnServerEvent:Connect(function(plr)
print("E")
local yellowHat = game.ServerStorage.Hats:FindFirstChild("GnomeHatYellow"):Clone()
local character = plr.Character
for i, v in pairs(character:GetDescendants()) do
if v:IsA("Accessory") then
v:Destroy()
end
end
yellowHat.Parent = character
plr.Team = game.Teams["Gnome King"]
end)