#Int value not run function

35 messages · Page 1 of 1 (latest)

inland canopy
#

This script is in StarterPlayer > StarterPlayerScripts (local Script)

#

This is in ServerScriptService (Normal Script):

local click = script.Parent.ClickDetector

click.MouseClick:Connect(function(Player)
local ButtonFolder = Player:FindFirstChild("ButtonsStats")

if ButtonFolder then
    local ButtonValue = ButtonFolder:FindFirstChild("ButtonClicked")

    if ButtonValue and ButtonValue.Value == 0 then
        if game.Workspace.File.One.Value == false or game.Workspace.File.Gold.Value == false then
            if Player.TeamColor == BrickColor.new("Really red") then
                open(Player, ButtonValue)
            end
        end
    end
end

end)

function open(Player, ButtonValue)
script.Parent.Main.Enabled = true
ButtonValue.Value = 1
end

#

The goal is to make buttons the if you already clicked on one of them you can't click on the other one

sharp vault
#

you're creating those on the client then

#

aka they wont replicate to the server aka those dont exist for the server

lilac spindle
robust prairieBOT
#

studio** You are now Level 2! **studio

inland canopy
#

Nothing happened with no errors

verbal perch
#

Or did I just not know the key mechanics of functions

inland canopy
inland canopy
# inland canopy

Players.harel1952.PlayerGui.ScreenGui.Frame.ScrollingFrame.Map1.ResetBuzzers:57: attempt to index nil with 'WaitForChild' - Server - ResetBuzzers:57

#

@lilac spindleSee

lilac spindle
inland canopy
#

Wdym?

lilac spindle
#

define player...

inland canopy
#

Wdym?!!?!?!

#

ohhh

#

Look

lilac spindle
inland canopy
#

So what can give me the player?

#

@lilac spindleDo you know how to get the player?

inland canopy
#

???

verbal perch
#

@inland canopy game:GetService("Players")

inland canopy
#

Oh…

#

Let me try

verbal perch
#

All good now?

inland canopy
#

YESS

#

TYSMM

#

You helped a lot