Hey I made a teleporting script but it won't start. The player is supposed to have 5 items collected and then teleport.
local teleportpart = script.Parent
local pointsIntValue = game.Players:GetPlayers("Items")
if pointsIntValue == 5 then
teleportpart.Touched:Connect(teleport)
end
function teleport(otherPart)
local character = otherPart.Parent
local humanoid = character.Parent:FindFirstChildWhichIsA("Humanoid")
if humanoid then
humanoid.Position = humanoid.Position(387.9, 6.9, -0.1)
end
end```
** You are now Level 4! **