#need help with my character selection system
1 messages · Page 1 of 1 (latest)
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)
okay
send server script
w script
Bru lol
this is my server script