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

When Developer Product Bought, Teleport to a part?

I Need a lot of help whit this. I Wanted to Make a screenGui that the game is closed but you could buy access to the game when you are over the void on a checkpoint. I want it to teleport you to the entrance of the game when you bought it + deleting the screen gui that says that the game is closed.

Here Is My Explorer, If you want more info on this make sure to tell me in the Comments. Image Of My Explorer In New Tab

My Script From The Image (In ServerScriptService):

local MarketPlaceService = game:GetService('MarketplaceService')
local id = 448687322

MarketPlaceService.ProcessReceipt = function(receiptInfo)
	for i, player in ipairs(game.Players:GetChildren()) do
		if player.userId == receiptInfo.PlayerId then
			if receiptInfo.ProductId == id then
				--Teleport To Part
			end
		end
	end
end

Please Help Me!

2 comments

0

This is a request.

0

you can teleport a player by changing the position of humanoidrootpart, the other parts will follow

1 answer

✓ Accepted answer

if i do not misunderstand you just need to do something like this

player.Character.HumanoidRootPart.CFrame = workspace["When bought teleport to this block"].CFrame+Vector3.new(0,5,0) -- This teleports the player to the block and additional 5 Studs Above(if you dont want the 5 studs just remove the +Vector3.new(0,5,0) at the end)

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