Hellow everyone!
While pressing the key, I encountered a problem such as " attempt to index nil with ‘WaitForChild’ " :
local Player = game.Players.LocalPlayer
local Button = script.Parent.Parent:WaitForChild("ClickButton")
script.Parent.Parent.ClickButton.MouseButton1Click:Connect(function(plr, plrGui)
if plr:WaitForChild("leaderstats"):WaitForChild("DislikesBoost") > 0 then
game.ServerScriptService:WaitForChild("DislikesManeger").Disabled = true
game.ServerScriptService:WaitForChild("BoostedScript").Disabled = false
end
end)
The place of the problem:
if plr:WaitForChild("leaderstats"):WaitForChild("DislikesBoost") > 0 then