In a ServerScript, I have implemented attributes created in the Player to determine whether they are playing a game or not. How can I get the Player who interacted with the game to check the value of their “playinggame” attribute? [player:GetAttribute(“playinggame”)]
local function onClick(playing)
if gameinfo.State.Value == "IDLE" and gameinfo.TicketsWon.Value <= 0 and player:GetAttribute("playinggame") == false then
--Code
end
end
script.Parent.ClickDetector.MouseClick:connect(onClick)
local function onClick(player)
local playing=player:GetAttribute("playinggame")
if gameinfo.State.Value == "IDLE" and gameinfo.TicketsWon.Value <= 0 and playing == false then
end
end
script.Parent.ClickDetector.MouseClick:connect(onClick)
local function onClick(player,playing)
if gameinfo.State.Value == "IDLE" and gameinfo.TicketsWon.Value <= 0 and player:GetAttribute("playinggame") == false then
end
end
script.Parent.ClickDetector.MouseClick:connect(function(player)
local playing= true
onClick(player,playing)
end