#Gui not enabling
17 messages · Page 1 of 1 (latest)
local TweenService = game:GetService("TweenService")
local Guis = game:GetService("Players").LocalPlayer.PlayerGui
local openscriptparent = game:GetService("StarterGui").ScreenGui.TextButton
local Nahbromenu = Guis.ScreenGui["You're not supposed to be here"]
local player = game:GetService("Players").LocalPlayer
local teamtojoin = game:GetService("Teams").Neutral
local cooldownonBEQUIET = false
--settings
local easingstyle = Enum.EasingStyle.Quint -- change it to whatever, idk test some stuff out -Yvain
local easingspeed = 0.5
local slot1 = game.Workspace.Menuchar.Slot1:WaitForChild("Head").BillboardGui.TextLabel -- Replace with the actual name of slot1 player
local slot2 = game.Workspace.Menuchar.Slot2:WaitForChild("Head").BillboardGui.TextLabel
local slot3 = game.Workspace.Menuchar.Slot3:WaitForChild("Head").BillboardGui.TextLabel
local slot4 = game.Workspace.Menuchar.Slot4:WaitForChild("Head").BillboardGui.TextLabel
local function onButtonClicked()
if not player.Character or player.Team ~= teamtojoin then
script.Enabled = false
else
if cooldownonBEQUIET == false then
cooldownonBEQUIET = true
TweenService:Create(Nahbromenu, TweenInfo.new(easingspeed, easingstyle, Enum.EasingDirection.InOut, 0), {Position = UDim2.new(0.881, 0,0.32, 0)}):Play()
wait(1.2)
TweenService:Create(Nahbromenu, TweenInfo.new(easingspeed, easingstyle, Enum.EasingDirection.InOut, 0), {Position = UDim2.new(1.1, 0,0.32, 0)}):Play()
wait(1.3)
cooldownonBEQUIET = false
end
end
end*`
**script.Parent.MouseButton1Click:Connect(onButtonClicked)
game:GetService("Players").PlayerAdded:Connect(function(player)
openscriptparent.MouseButton1Click:Connect(function()
print(player.Name .. " pressed the button")
if player.Name == slot1.Text then
game.Workspace.Menuchar.Slot1.Head["Ready?"].Enabled = true
elseif player.Name == slot2.Text then
game.Workspace.Menuchar.Slot2.Head["Ready?"].Enabled = true
elseif player.Name == slot3.Text then
game.Workspace.Menuchar.Slot3.Head["Ready?"].Enabled = true
elseif player.Name == slot4.Text then
game.Workspace.Menuchar.Slot4.Head["Ready?"].Enabled = true
end
end)
end)**
The point of this is to check what player pressed the button
and if so enable a billboard gui inside of a fake menu characters head that gets given the name of the player
The slots (fake characters) have their own script that checks what order the player joins and changes a different billboard gui to show their name over the fake character
okay i'm gonna format it then look at it
ocal TweenService = game:GetService("TweenService")
local Guis = game:GetService("Players").LocalPlayer.PlayerGui
local openscriptparent = game:GetService("StarterGui").ScreenGui.TextButton
local Nahbromenu = Guis.ScreenGui["You're not supposed to be here"]
local player = game:GetService("Players").LocalPlayer
local teamtojoin = game:GetService("Teams").Neutral
local cooldownonBEQUIET = false
--settings
local easingstyle = Enum.EasingStyle.Quint -- change it to whatever, idk test some stuff out -Yvain
local easingspeed = 0.5
--
local slot1 = game.Workspace.Menuchar.Slot1:WaitForChild("Head").BillboardGui.TextLabel -- Replace with the actual name of slot1 player
local slot2 = game.Workspace.Menuchar.Slot2:WaitForChild("Head").BillboardGui.TextLabel
local slot3 = game.Workspace.Menuchar.Slot3:WaitForChild("Head").BillboardGui.TextLabel
local slot4 = game.Workspace.Menuchar.Slot4:WaitForChild("Head").BillboardGui.TextLabel
local function onButtonClicked()
if not player.Character or player.Team ~= teamtojoin then
script.Enabled = false
else
if cooldownonBEQUIET == false then
cooldownonBEQUIET = true
TweenService:Create(Nahbromenu, TweenInfo.new(easingspeed, easingstyle, Enum.EasingDirection.InOut, 0), {Position = UDim2.new(0.881, 0,0.32, 0)}):Play()
wait(1.2)
TweenService:Create(Nahbromenu, TweenInfo.new(easingspeed, easingstyle, Enum.EasingDirection.InOut, 0), {Position = UDim2.new(1.1, 0,0.32, 0)}):Play()
wait(1.3)
cooldownonBEQUIET = false
end
end
end
script.Parent.MouseButton1Click:Connect(onButtonClicked)
game:GetService("Players").PlayerAdded:Connect(function(player)
openscriptparent.MouseButton1Click:Connect(function()
print(player.Name .. " pressed the button")
if player.Name == slot1.Text then
game.Workspace.Menuchar.Slot1.Head["Ready?"].Enabled = true
elseif player.Name == slot2.Text then
game.Workspace.Menuchar.Slot2.Head["Ready?"].Enabled = true
elseif player.Name == slot3.Text then
game.Workspace.Menuchar.Slot3.Head["Ready?"].Enabled = true
elseif player.Name == slot4.Text then
game.Workspace.Menuchar.Slot4.Head["Ready?"].Enabled = true
end
end)
end)
I had no idea you could do that
all good looking at the code now