hello im making a house system but i have a problem when a player left the game here is the script
local casa = workspace.casaAvere
local text = script.Parent.test.teSTO.SurfaceGui.TextLabel
local name = script.Parent.test.teSTO.name
game.Players.PlayerRemoving:Connect(function(player)
if player.Name == name.Value then
text.Text = "house for sale ,give 50 bobux to bobux man"
wait(.2)
name.Value = nil
wait(.2)
casa.Value = false
end
end)
there is the error Workspace.left1:8: invalid argument #3 (string expected, got nil)

2 comments
change name to Name on line 3.
there is still the error