#need help with my character selection system

1 messages · Page 1 of 1 (latest)

obtuse spindle
#

i have that script here that resets my character when i click on gui Builderman or John doe, then it should enable Character1 gui for builderman or Character2 gui for John doe but its not working, can please someone help me

#

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Players = game:GetService("Players")
local player = Players.LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")

local loadCharacterGUIEvent = ReplicatedStorage:WaitForChild("LoadCharacterGUI")

-- GUIs aus PlayerGui
local character1GUI = playerGui:WaitForChild("Character1") -- ScreenGui
local character2GUI = playerGui:WaitForChild("Character2") -- ScreenGui

-- Anfang: beide aus
character1GUI.Enabled = false
character2GUI.Enabled = false

print("Client started: both GUIs disabled")

loadCharacterGUIEvent.OnClientEvent:Connect(function(characterName)
print("Character received from server:", characterName)

-- Alles aus
character1GUI.Enabled = false
character2GUI.Enabled = false

-- Nur die richtige an
if characterName == "Builderman" then
    character1GUI.Enabled = true
    print("Builderman GUI activated")

elseif characterName == "JohnDoe" then
    character2GUI.Enabled = true
    print("JohnDoe GUI activated")

else
    warn("Unknown Character:", characterName)
end

end)

hybrid depot
#

hmm

#

@obtuse spindle

#

ill tajewa look

obtuse spindle
#

okay

lyric gale
wary rampart
#

w script

hybrid depot
#

Bru lol

obtuse spindle