Trying to make a Drop Offs/NBA 2K player pad

Hi, I’m trying to make a NBA 2K park player pad like the image below. When two players stand on the two pads a basketball game starts, and it teleports them to the court. The issue that I having is that it is not teleporting them to the court, and I’m not sure why

I have tried this so far, but I’m pretty sure this isn’t right. I’ve just started learning how to script about a month ago, so your help would be much appreciated.

local HomePad = script.Parent.HomeSpot:WaitForChild("Pad")
local AwayPad = script.Parent.AwaySpot:WaitForChild("Pad")
local Court = script.Parent.Court
local HomeGradient = script.Parent.HomeSpot.Gradient
local AwayGradient = script.Parent.AwaySpot.Gradient
local Queued = false
local AwayQueued = false
local HomePadReady = false
local AwayPadReady = false
local Ready = false

HomePad.Touched:Connect(function(Player)
	if game.Players:GetPlayerFromCharacter(Player.Parent) and not Queued then
		Queued = true
		local HomePadReady = true
		local Character = Player.Parent
		local Humanoid = Character.Humanoid
		script.Parent._Players.B1_Player.Value = game.Players:GetPlayerFromCharacter(Player.Parent)
		Humanoid.WalkSpeed = 0
		Character:MoveTo(HomePad.Position)
		HomePad.Color = Color3.fromRGB(255, 0, 0)
		HomeGradient.Part1.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
		HomeGradient.Part2.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
		HomeGradient.Part3.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
		HomeGradient.Part4.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
			if script.Parent._GameValues.Started.Value == true then
				wait(3)
				Character:MoveTo(script.Parent.Court.HomePad.Position)
			end
		end
end)

AwayPad.Touched:Connect(function(Player)
	if game.Players:GetPlayerFromCharacter(Player.Parent) and not AwayQueued then
		AwayQueued = true
		local AwayPadReady = true
		local Character = Player.Parent
		local Humanoid = Character.Humanoid
		script.Parent._Players.R1_Queue.Value = game.Players:GetPlayerFromCharacter(Player.Parent)
		Humanoid.WalkSpeed = 0
		Character:MoveTo(AwayPad.Position)
		AwayPad.Color = Color3.fromRGB(255, 0, 0)
		AwayGradient.Part1.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
		AwayGradient.Part2.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
		AwayGradient.Part3.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
		AwayGradient.Part4.Beam.Color = ColorSequence.new(Color3.fromRGB(255,0,0),Color3.fromRGB(255,0,0))
		if HomePadReady == true and AwayPadReady == true then
			script.Parent._GameValues.Started.Value = true
		if script.Parent._GameValues.Started.Value == true then
			wait(3)
			Character:MoveTo(script.Parent.Court.AwayPad.Position)
			end
		end
	end

Why don’t you just teleport the humanoidrootpart of both players to different invisible bricks inside of it?

1 Like