ROBLOX scripts to make scripting easier!
-- List of functions
function teleport(Player)
function fade_screen()
script playerHeight
program closeRoblox
Click to expand
- Add the Teleport_Script.lua inside the teleport part. This is the part that the player will touch to teleport.
- 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
- Create a screen GUI under 'StarterGUI', this will be the screen fade GUI.
- 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.
- 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
- 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
- Add the Player_Height.lua inside the StarterGUI height GUI.
- 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
- 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)
Everything is coded by Alex lo Storto
Licensed under the MIT License.