So, I’m trying to lobby a part that when a certain amount of people touch it, they teleport to a map.
Something like Piggy.
The script i tryed is this:
local PlayerCount = script.Parent.PlayerCount
local function PlayerTouched(Part)
PlayerCount.Value = PlayerCount.Value + 1
end
PlayerCount.Changed:Connect(function()
if PlayerCount >= 4 then
wait(10)
else
print(“Need Players”)
end
end)
I test it but the output doesn’t print “Need Players”.
The error that shows in the output is this: [13:38:57.418 - PlayerCount is not a valid member of Part]
Any idea what can i do?
(If you ask. I get the script from an old dev forum post)