#Does not change the values ingame!

57 messages · Page 1 of 1 (latest)

thick dagger
#
  • 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)

weary galleon
#

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

thick dagger
#

ohh

#

so where do i find it in the workspace bc its not on the part

weary galleon
#

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

weary galleon
thick dagger
#

wait so how do i do it?

weary galleon
#

Instead of StarterGui do this

#

Game.Players.LocalPlayer.PlayerGui

#

For game.Players.LocalPlayer you can replace with the local player

thick dagger
#

isn't it already like that in the video

weary galleon
#

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

thick dagger
weary galleon
#

I read it wrong mb

#

I can see yoou changed it

#

Is it giving any errors or anything different

thick dagger
#

nope

weary galleon
#

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

thick dagger
#

idk im kind of new to scripting, just doing what i know

weary galleon
#

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

thick dagger
#

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

weary galleon
#

#mineButtons will always return 0 no matter what

thick dagger
#

wait so how do i fix it

craggy helmBOT
#

studio** You are now Level 5! **studio

weary galleon
#

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

thick dagger
weary galleon
#

Bro just replace #mineButtons with the amount of items in the dictionary

thick dagger
#

it dosent work

weary galleon
#

Lemme see the script

#

Also you should add a minimum and a max (1, 9)

thick dagger
weary galleon
#

Do you want me to script this game for u gang

#

If you want the entire game done by me I go for cheap

thick dagger
weary galleon
#

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)

thick dagger
#

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

weary galleon
#

Oh Ight is 5 Ight?