I really do not know how.
I tried some ways,but it just won’t spawn,like at all.
Hello there.
I can’t really help you, as you didn’t tell much details.
Can you share more details please?
If you really just want to spawn a gui every minute, then just use while loops.
This gui,will spawn with a chance of 1% (math.random(1,100)) every 100 seconds.
There would be 2 options: “no” of course,and “yes”.
All i need, is just to make that gui appear every 100 seconds with a chance of 1%.
EDIT:Here’s a script,I already have.
while wait(1) do
local a = math.random(1,5)
print(a)
if a == 1 and game.ServerStorage:FindFirstChild("Sans") then
game:GetService("StarterGui").ScreenGui.Frame.Visible = true
game:GetService("StarterGui").ScreenGui.Enabled = true
if game:GetService("StarterGui").ScreenGui.Frame.yes.MouseButton1Click then
game:GetService("StarterGui").ScreenGui.Frame.Visible = false
local huii = game.ServerStorage:FindFirstChild("Sans")
huii.Parent = workspace.penis
task.wait(3)
elseif game:GetService("StarterGui").ScreenGui.Frame.no.MouseButton1Click then
game:GetService("StarterGui").ScreenGui.Enabled = false
game:GetService("StarterGui").ScreenGui.Frame.Visible = false
end
elseif a == 1 and not game.ServerStorage:FindFirstChild("Sans") then
warn("no sans,no balls,and no rizz")
end
end
You can’t edit StarterGUI elements. You have to edit the cloned GUI inside of player GUI. I’ll make you a new script and send it to you once I’m finished.
By The way, you can’t access ServerStorage inside of a local script. That means you can’t access “Sans” instance in SS. Move it to Replicated Storage to make it work.
Script Type: Local Script
Parent: The GUI You want to spawn.
--// Services
local ReplicatedStorage = game:GetService("ReplicatedStorage")
--// ReplicatedStorage Elemense
local Sans = ReplicatedStorage:FindFirstChild("Sans")
--// GUI Elements
local GUI = script.Parent :: ScreenGui -- This is the GUI you want to spawn every second. Feel free to change the path to whatever you want. (As long as it's still a ScreenGUI.)
local Frame = GUI:WaitForChild("Frame") :: Frame -- This is a Frame Path. Feel free to customize!
local YesButton = Frame:WaitForChild("Yes") :: GuiButton -- This is a Yes Button Path. Feel free to customize!
local NoButton = Frame:WaitForChild("No") :: GuiButton -- This is a No Button Path. Feel free to customize!
YesButton.Activated:Connect(function()
Frame.Visible = false
GUI.Enabled = false
Sans.Parent = workspace.penis
end)
NoButton.Activated:Connect(function()
GUI.Enabled = false
Frame.Visible = false
end)
while task.wait(1) do
local RandomNum = math.random(1, 100) -- Get a Fresh Random Number Every Second
if RandomNum == 1 and Sans then
Frame.Visible = true
GUI.Enabled = true
elseif RandomNum == 1 and not Sans then
warn("no sans,no balls,and no rizz")
end
end
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.