Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

why my player teleport script not working?

local Tycoons = game.Workspace.Tycoons

local function playerAdded(player)
	for i, tycn in pairs(Tycoons:GetChildren()) do
		local owner = tycn:FindFirstChild("TycoonOwner")
		if owner.value == nil then
			
			local playerValue = Instance.new("ObjectValue")

			playerValue.Name = "TycoonOwned"
			playerValue.Value = tycn
			playerValue.Parent = player
			
			owner.Value = player
			
			local char = player.CharacterAdded:wait()


			char.HumanoidRootPart.CFrame = CFrame.new(tycn.tele.CFrame.X, tycn.tele.CFrame.Y + 10, tycn.tele.CFrame.Z)
			
			break
		end
	end
end

game.Players.PlayerAdded:Connect(playerAdded)

hello, everything in this script are working fine except for line 19. I tried everything including making the CFrame X,Y and Z number values. I even tried using the SetPrimaryPartCframe function

1 answer

This discussion is preserved as it was. New answers, comments, and votes are closed.