Here's what someone said would work. I'm NOT a scripter but he said to put this in the block and when the Suitcase tool hit it, it'd teleport to where I want. How would this be able to work?

bin = script.Parent

function teleportPlayer(pos)

	local player = game.Players.LocalPlayer
	if player == nil or player.Character == nil then return end

	local char = player.Character.Torso

	char.CFrame = CFrame.new(Vector3.new(pos.x, pos.y + 7, pos.z))

end


enabled = true
function onButton1Down(mouse)
	if not enabled then
		return
	end

	local player = game.Players.LocalPlayer
	if player == nil then return end
	local cf = mouse.Hit
	teleportPlayer(cf.p)

end

function onSelected(mouse)
	mouse.Icon = "rbxasset://textures\\ArrowCursor.png"
	mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

bin.Selected:connect(onSelected)

3 comments

0

I also tried changing player to tool but nothing.

0

Edited to fix formatting.

0

Thanks :3