Skip to content

alexlostorto/ROBLOX

Repository files navigation

ROBLOX

ROBLOX scripts to make scripting easier!

Maintainability

-- List of functions
function teleport(Player)
function fade_screen()
script playerHeight
program closeRoblox

📔 Table of Contents

Click to expand

📋 Scripts

Teleport Script

  1. Add the Teleport_Script.lua inside the teleport part. This is the part that the player will touch to teleport.

location of black teleport frame

  1. Change the 'teleportTo' variable to the part which you want the player to teleport to.
-- Creates the variable for the object to teleport to
teleportTo = game.Workspace["GYM INDOOR"].Enter

Fade Screen Script

  1. Create a screen GUI under 'StarterGUI', this will be the screen fade GUI.

location of black teleport frame

  1. In the screen GUI, add a frame, set its colour to black and visibility to false. Add the Fade_Screen.lua script in the screen GUI too.

location of black teleport frame

  1. Change the 'part' variable to the part which you want to trigger the screen fade.
-- The part which triggers the screen fade
local part = workspace.GYM.GymDoor
  1. Change the 'duration' variable (in seconds) if you want to make the screen fade longer or shorter.
-- How long you want the fade screen to last
duration = 3

Player Height Script

  1. Add the Player_Height.lua inside the StarterGUI height GUI.

image coming soon

  1. Change the 'offsetY' variable to make sure the value is zero when the player spawns.
-- Creates the variable for the y-offset
local offsetY = -76.99
  1. The height value is divided by 3 to convert ROBLOX studs to metres.
-- Converts studs to metres
math.floor((Char.HumanoidRootPart.Position.Y + offsetY) / 3)

📜 Credits

Everything is coded by Alex lo Storto

Licensed under the MIT License.