local locations = game.Workspace.Tplocations:GetChildren() local randomItem = locations[math.random(1, #locations)] script.Parent.Touched:Connect(function(hit) if(hit.Parent:FindFirstChild("Humanoid")) then hit.Parent.HumanoidRootPart.Position = Vector3.new(randomItem.Position) end end)
this is the script, I put parts at locations that script randomly chooses single one and spawns player there after touching part, but problem is that everytime player touches part, player always gets teleported to same location and its not at place of any location I put parts at