Skip to content
Om Puter

Om Puter

Berbagi Tutorial Coding dan Pemrograman Komputer

Menu
  • Channel YouTube ThirteeNov
  • Channel YouTube Om Puter
Menu

Script trigger di Roblox untuk berpindah place / map

Posted on 24 September 202524 September 2025 by OmPuter

Misal kita punya lebih dari satu map dalam game Roblox kita, caranya agar player bisa berpindah place, buat trigger yang berisi script ini:

local TeleportService = game:GetService("TeleportService")
local placeId = 123123123 -- ganti dengan PlaceId tujuan
local part = script.Parent

part.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		local character = player.Character
		if character then
			-- Bekukan player
			local humanoid = character:FindFirstChildOfClass("Humanoid")
			if humanoid then
				humanoid.WalkSpeed = 0
				humanoid.JumpPower = 0
			end

			-- Pindahkan player jauh ke bawah map (aman dari musuh)
			local hrp = character:FindFirstChild("HumanoidRootPart")
			if hrp then
				hrp.CFrame = CFrame.new(0, -5000, 0) -- koordinat jauh di bawah
			end
		end

		-- Tambah overlay hitam di layar player
		local gui = Instance.new("ScreenGui")
		gui.IgnoreGuiInset = true
		gui.ResetOnSpawn = false
		gui.Name = "TeleportBlackout"

		local frame = Instance.new("Frame")
		frame.Size = UDim2.new(1, 0, 1, 0)
		frame.BackgroundColor3 = Color3.new(0, 0, 0)
		frame.BorderSizePixel = 0
		frame.Parent = gui

		gui.Parent = player:WaitForChild("PlayerGui")

		-- Lanjut teleport
		TeleportService:Teleport(placeId, player)
	end
end)
Post Views: 585

Kategori

  • 3D Max
  • Adobe Animate
  • Android
  • c#
  • Cordova
  • HTML5, CSS & JavaScript
  • iOS
  • Lain-lain
  • Photoshop
  • PHP
  • Python
  • Roblox
  • Tak Berkategori
  • Unity
  • WordPress
ciihuy2020
© 2026 Om Puter | Powered by Superbs Personal Blog theme