local plr = script.Parent.Parent.Parent.Parent.Parent local Clicked = false script.Parent.MouseButton1Click:Connect(function() local Twoplayers = math.random(1,2) local Threeplayers = math.random(1,3) local Fourplayers = math.random(1,4) local TableOfPlayers = game.Players:GetPlayers() script.Parent.Parent.Parent.Enabled = false if Clicked == false then Clicked = true for i = 0, 5 do local block = game.Workspace.Blocks:FindFirstChild(plr.Name) block:Destroy() Clicked = false end end
Error is on line 13
i think you have to put it as:
local block = game.Workspace.Blocks:FindFirstChild(tostring(plr.Name))
im not 100% sure it will work but yeah
I found the answer it was a mistake with naming the cubes. Sorry for wasting anytime and thank you for anyone that helped me! and remember to always check over your code.