RobloxScripterAI
Discord ↗
Link Copied to Clipboard
×
"teleport places using proximity prompt with instructions on how to modify and where to put it"
-- local script for ProximityPrompt (place it in StarterGui) local ProximityPromptService = game:GetService("ProximityPromptService") local function onPromptTriggered(player) local destination = game.Workspace.Destination -- change this to the name of the destination part local character = player.Character if character then local humanoidRootPart = character:FindFirstChild("HumanoidRootPart") if humanoidRootPart then humanoidRootPart.CFrame = destination.CFrame end end end local proximityPrompt = Instance.new("ProximityPrompt") proximityPrompt.ActionText = "Teleport" -- change this to the desired action text proximityPrompt.ObjectText = "Destination" -- change this to the desired object text proximityPrompt.Parent = script.Parent ProximityPromptService.PromptTriggered:Connect(onPromptTriggered) -- Instructions 1. Create a part in your game where you want the player to teleport from, and name it "TeleportPart". 2. Create another part in your game where you want the player to teleport to, and name it "Destination". 3. Copy the local script above and paste it into a new LocalScript in StarterGui. 4. Customize the 'destination', 'ActionText', and 'ObjectText' values in the script to match your desired destination part and prompt text. 5. Parent the LocalScript to the "TeleportPart" in the game. 6. Test the game, and the proximity prompt should appear when a player is near the "TeleportPart". When they interact with it, they will be teleported to the "Destination" part.