-- FOLLOW-ME FLOATING PLATFORM -- For your own Roblox Studio game -- Place in StarterPlayer > StarterPlayerScripts -- Use a LocalScript local Players = game:GetService("Players") local RunService = game:GetService("RunService") local player = Players.LocalPlayer local speed = 5 local platform local connection local enabled = false local gui = Instance.new("ScreenGui") gui.Name = "FloatingPlatformGui" gui.ResetOnSpawn = false gui.Parent = player:WaitForChild("PlayerGui") local button = Instance.new("TextButton") button.Size = UDim2.new(0, 155, 0, 50) button.Position = UDim2.new(1, -170, 0.5, -25) button.BackgroundColor3 = Color3.fromRGB(0, 170, 255) button.TextColor3 = Color3.new(1, 1, 1) button.TextScaled = true button.Text = "Platform: OFF" button.Parent = gui local function stopPlatform() enabled = false if connection then connection:Disconnect() connection = nil end if platform then platform:Destroy() platform = nil end button.Text = "Platform: OFF" button.BackgroundColor3 = Color3.fromRGB(0, 170, 255) end local function startPlatform() local character = player.Character local root = character and character:FindFirstChild("HumanoidRootPart") if not root then return end platform = Instance.new("Part") platform.Name = "FollowPlatform" platform.Size = Vector3.new(7, 1, 7) platform.Anchored = true platform.CanCollide = true platform.Material = Enum.Material.Neon platform.Color = Color3.fromRGB(0, 255, 255) platform.Position = root.Position - Vector3.new(0, 4, 0) platform.Parent = workspace enabled = true button.Text = "Platform: ON" button.BackgroundColor3 = Color3.fromRGB(0, 200, 80) connection = RunService.Heartbeat:Connect(function(dt) if not enabled or not root.Parent or not platform then stopPlatform() return end -- Follow underneath the player's horizontal position local targetPosition = Vector3.new( root.Position.X, platform.Position.Y + speed * dt, root.Position.Z ) platform.Position = targetPosition end) end button.Activated:Connect(function() if enabled then stopPlatform() else startPlatform() end end) player.CharacterAdded:Connect(function() stopPlatform() end)