I have checked it and it is normal exactly the same as the other gui one but it just wont work when i click it.. It was fine at first but then I changed it to keep the element forever but now i can only select one.. Heres the code (please help me)
local rp = game:GetService ("ReplicatedStorage")
local Class = rp:WaitForChild ("Class")
local players = game:GetService("Players")
local SS = game:GetService ("ServerStorage")
local Classes = SS:WaitForChild("Classes")
Class.OnServerEvent:Connect(function(Player,className)
local Backpack = Player.Backpack
local selection = Classes:FindFirstChild(className)
if selection then
local moveset = Classes:FindFirstChild(className):Clone()
moveset.Parent = Backpack
end
end)
And the second code is this: local Background = script.Parent
local rp = game:GetService ("ReplicatedStorage")
local Class = rp:WaitForChild ("Class")
for _, button in pairs(Background:GetChildren()) do
if button:IsA("ImageButton") then
button.MouseButton1Click:Connect(function()
Background.Visible = false
Class:FireServer(button.Name)
end)
local player = game.Players.LocalPlayer
local hum = player.Character:WaitForChild("Humanoid")
while true do
if hum.Health == 0 then
wait(5)
Class:FireServer(button.Name)
return
end
wait(0.1)
end
end
end

1 comment
Is your script in StarterPlayerScripts?