#Does not change the values ingame!
57 messages · Page 1 of 1 (latest)
- Script -
local mineButtons = {
game.StarterGui.MinesSurfaceGui.Frame.MineButton1.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton2.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton3.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton4.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton5.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton6.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton7.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton8.Value.Value,
game.StarterGui.MinesSurfaceGui.Frame.MineButton9.Value.Value
}
local button = script.Parent
button.Activated:Connect(function()
local randomIndices = {}
for i = 1, 3 do
local randomIndex = math.random(#mineButtons) + 1
table.insert(randomIndices, randomIndex)
end
for _, index in ipairs(randomIndices) do
mineButtons[index - 1] = false
end
print(mineButtons)
end)
print(mineButtons)
When you put something in starter gui when you start the game it will no longer be in starter gui
It will be in the gui under the player
If it’s a surface gui then it gets moved to the part that it’s selected
Mb I see what you did yeah it’s like a screen gui it’s inside the players gui
You can’t just go to StarterGui
StarterGui is moved to each play once the game starts
That’s only when it started under the part
wait so how do i do it?
Instead of StarterGui do this
Game.Players.LocalPlayer.PlayerGui
For game.Players.LocalPlayer you can replace with the local player
isn't it already like that in the video
In the script you have a list called mineButtons and it is going from the game to the StarterGui
Anything relating to Starter is useless to access after the game loaded in
Am I just stupid but why wouldn't this work
I read it wrong mb
I can see yoou changed it
Is it giving any errors or anything different
nope
Alright lemme look over it again
Alright I’m not sure if this will fix it but
Why are you using a dictionary instead of an array
idk im kind of new to scripting, just doing what i know
Alright what’s the main goal here
Like how is the list supposed to work
I hate dictionaries because 1 they don’t technically have a length so #list doesn’t work
Oh yeah idk how I didn’t see it
so the script takes 3 out of 9 random of the mineButtons and changes the boolValue property and then another script cheks the value and changes the img
#mineButtons will always return 0 no matter what
wait so how do i fix it
** You are now Level 5! **
Okay so instead of immediately adding it to the list do this
MineButtons[1] = Button1
And increase the [1] to the button
The brackets set what slot you want the button to be into
Wait are you ever adding more dice
If you aren’t then just replace #mineButtons with the number 9
nope
Bro just replace #mineButtons with the amount of items in the dictionary
it dosent work
Do you want me to script this game for u gang
If you want the entire game done by me I go for cheap
haha how much
It matters the game but I’ll do like 10-20 but I would have to look at the entire game first
I do also accept robux
(Would rather cash tho)
yes there is like really nothing in the game yet, but how much for just the mines system, bc i need to practice my scripting so i will do everything else
Oh Ight is 5 Ight?