diff --git a/.hintrc b/.hintrc new file mode 100644 index 0000000..d113701 --- /dev/null +++ b/.hintrc @@ -0,0 +1,18 @@ +{ + "extends": [ + "development" + ], + "hints": { + "axe/language": "off", + "meta-charset-utf-8": "off", + "compat-api/html": [ + "default", + { + "ignore": [ + "meta[name=theme-color]" + ] + } + ], + "meta-viewport": "off" + } +} \ No newline at end of file diff --git a/ButtonConverter.md b/0.7_ButtonConverter.md similarity index 99% rename from ButtonConverter.md rename to 0.7_ButtonConverter.md index ce8798f..8175e16 100644 --- a/ButtonConverter.md +++ b/0.7_ButtonConverter.md @@ -94,4 +94,4 @@ if map then end error("CANT FIND MAP") end -``` \ No newline at end of file +``` diff --git a/EffectScript.md b/EffectScript.md index 01a3581..1d52cd7 100644 --- a/EffectScript.md +++ b/EffectScript.md @@ -1,22 +1,24 @@ # EffectScript -EffectScript is a localscript inside of the Tria.OS Map Making Kit, it should be used as an alternative to the LocalMapScript if you want your code to be replicated to other spectators. - -In order for the EffectScript to communicate we use RemoteEvents which are fired from the MapScript to the EffectScript. - -When a round starts all the old EffectScripts are deleted and if a new EffectScript is present, the script will be inserted into the Players PlayerGui, this is to prevent the EffectScript from being deleted if the player dies. +EffectScript is a [LocalScript](https://create.roblox.com/docs/reference/engine/classes/LocalScript) inside of the TRIA.os Map Making Kit, it should be used as an alternative to the LocalMapScript if you want your code to be replicated to other spectators. + +In order for the EffectScript to communicate we use [RemoteEvents](https://create.roblox.com/docs/reference/engine/classes/RemoteEvent) which are fired from the MapScript to the EffectScript. + +When a round starts all the old EffectScripts are deleted and if a new EffectScript is present in the map model, the script will be inserted into `game.Players.LocalPlayer.PlayerGui`, this is to prevent the EffectScript from being deleted if the player dies. If you wish to manually edit the EffectScript the location of it is `game.Players.LocalPlayer.PlayerGui` -Keep in mind that reparenting the EffectScript will cause the EffectScript not to be deleted on the next round and can potentially cause memory leaks. + +Keep in mind that reparenting the EffectScript to anywhere else will cause the EffectScript not to be deleted on the next round and can potentially cause memory leaks. ## Example of usage -The EffectScript uses the same methods as the MapScript to get the MapLib, being +The EffectScript uses the same methods as the MapScript to get the MapLib, being `local MapLib = game.GetMapLib:Invoke()()` Below is a simple example of how to use the EffectScript, in this example we will make a laser effect similar to Dystopia. -MapScript +MapScript code: + ```lua local MapLib = game.GetMapLib:Invoke()() @@ -29,7 +31,8 @@ task.wait(10) map.StopLaser:FireAllClients() ``` -EffectScript +EffectScript code: + ```lua local MapLib = game.GetMapLib:Invoke()() @@ -51,8 +54,3 @@ map.StopLaser.OnClientEvent:Connect(function() end end) ``` - - - - - diff --git a/FE2-TRIA-Converter.lua b/FE2-TRIA-Converter.lua index 52fa856..421215f 100644 --- a/FE2-TRIA-Converter.lua +++ b/FE2-TRIA-Converter.lua @@ -1,6 +1,6 @@ ----------------------------------------- ----- Flood escape 2 to V2 converter ---- ----------------------------------------- +--------------------------------------------- +---- Flood Escape 2 to TRIA.os converter ---- +--------------------------------------------- function valueToAttribute(value) if value:IsA("ValueBase") then @@ -107,7 +107,7 @@ return function(oldMap, options) local s = map.MapScript.Source s = s:gsub( "workspace%.Multiplayer%.GetMapVals%:Invoke%(%)", - "game.ServerStorage.Bindables.GetMapLib:Invoke()()" + "game.GetMapLib:Invoke()()" ) s = s:gsub( "Lib%.Button:connect%(function%(p, bNo%) if Lib%.btnFuncs%[bNo%] then Lib%.btnFuncs%[bNo%]%(bNo, p%) end end%)", @@ -153,4 +153,4 @@ return function(oldMap, options) ) until a map.MapScript.Source = s -end \ No newline at end of file +end diff --git a/FeatureLib.md b/FeatureLib.md index 8323739..38d00a8 100644 --- a/FeatureLib.md +++ b/FeatureLib.md @@ -1,12 +1,63 @@ # Tria.OS Features Library -## Lighting +## NOTE: DO NOT USE ANY FEATURES LABELED AS "DEPRECATED" -### LightingFeature:SetLighting(newLighting: `{ [string]: any }`): `nil` +## Lighting (DEPRECATED) -### LightingFeature:EaseLighting(newLighting: `{ [string]: any }`, tweenInfo: `TweenInfo`): `Tween` +This section lists all features releated to Lighting. -## Players +### LightingFeature:SetLighting(newLighting: `{ [string]: any }`) -### PlayersFeature:GetPlayers(): `[]Player` +Example: +```lua +MapLib:GetFeature("Lighting"):SetLighting({ +FogEnd = 100, +FogStart = 1, +FogColor = Color3.new(1, 0, 0), +Ambient = Color3.new(1, 1, 0), +OutdoorAmbient = Color3.new(1, 0, 1), +}) +``` + +Used to set the lighting of maps, such as the Ambient and FogColor. + +### LightingFeature:EaseLighting(newLighting: `{ [string]: any }`, tweenInfo: `TweenInfo`) + +Example: + +```lua +MapLib:GetFeature("Lighting"):EaseLighting({ +FogEnd = 100, +FogStart = 1, +FogColor = Color3.new(0, 1, 1), +},TweenInfo.new(4, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)) +``` + +Tweens the lighting to the values set in the function. They can be customized by lighting and the way the lighting tweens (by using `TweenInfo`). + +## Players (DEPRECATED) + +This section lists all features releated to Players. + +### PlayersFeature:GetPlayers(): `[Player]` + +Example: + +```lua +MapLib:GetFeature("Players"):GetPlayers() +``` + +old/deprecated, use MapLib:GetPlayers() + +## Miscellaneous + +### MapLib:AllowSliding(slideState: `boolean`): `nil` + +Example: + +```lua +MapLib:AllowSliding(true) +``` + +This function can be used to change sliding state in maps. `true` enables sliding and `false` disables sliding. diff --git a/MapKitDocumentation.txt b/MapKitDocumentation.txt index 6c588f6..09536f7 100644 --- a/MapKitDocumentation.txt +++ b/MapKitDocumentation.txt @@ -1,4 +1,5 @@ --[[ TRIA.os MAP KIT DOCUMENTATION ]]-- +--[[ THIS PUBLIC DOCUMENT BELONGS TO TRIA CORPORATION ]]-- --[[ BGGPPPPPPPPGGB#& GGGGB#&&& &&BGGGG#& @@ -59,11 +60,9 @@ C-Settings A map with buttons will need the buttons to be pressed before ExitRegion can be used. 2 -AUDIO- - Audio MUST be free to use for non commercial purposes or commercial purposes. + Audio MUST be licensed with the composer of that audio and you will need a screenshot/video of your map to prove that the audio you are verifying isn't for nothing. TRIA.os is not ran for a commercial profit, and the only profit made is through premium users playing the game and will continue like this forever. - Audio functionallity is currently unknown, with recent roblox changes. - -3 - + Audio now needs to be verified before it can be heard by everyone playing any maps that has that audio in it. ]] @@ -71,58 +70,59 @@ C-Settings 1 -SPAWN- Part named Spawn - The point at which the players will spawn, with the front of the part being where players spawn. + The point in a map which the players will spawn, with the front of the part (marked by a green label) being where players' camera is heading towards. 2 -EXITREGION- Part named ExitRegion - When player enters this block the round is won if all buttons are pressed - For more than ONE ExitRegion create a Folder or Model named ExitRegion, and all parts within it will be ExitRegion parts + When player enters this block, the round is won if all buttons are pressed. + For more than ONE ExitRegion create a Folder or Model named ExitRegion, and all parts within it will be ExitRegion parts. 3 -EXITBLOCK- Part named ExitBlock - When a player enters ExitRegion, will turn to cancollide on to prevent players from leaving exit + When a player enters ExitRegion, will turn to cancollide on to prevent players from leaving exit. 4 -WALLJUMPS- Part with the name _WallJump and value _WallJump - Creates a part which can be jumped from + Creates a part which can be jumped from. 5 -WALLRUNS- Part with the name _WallRun and value _WallRun - _WallRun value contains the speed of the wallrun, how fast it is going - Wallruns act as walljumps that move the player towards the local positive X direction + _WallRun value contains the speed of the wallrun which controls how fast the player will travel on the wallrun and the momentum of the player when jumping out of the wallrun. + Wallruns act as walljumps that move the player towards the local positive X direction. 6 -LIQUIDS- Part with the name _Liquid - There are three default liquid types, those being "water", "acid", and "lava" which can be changed in the mapscript or a value - You can assign a part to be liquid by turning cancollide off and assigning a liquid type to it, either using a script or a StringValue + There are three default liquid types, those being "water", "acid", and "lava" which can be changed in the MapScript or a value. + You can assign a part to be liquid by turning cancollide off and assigning a liquid type to it, either using a script or a StringValue. To set it using a StringValue, add a StringValue to any liquid part, and rename it "Type". Then, set the Value to any liquid type. - To set it using the script, use 'Lib.setLiquidType(Lib.Map._Water._Liquid#, "type")' + To set it using the script, use 'MapLib:SetLiquidType(MapLib.map._Water._Liquid#, "type")' + If you don't assign the liquid type of a liquid, the liquid will break functionality of the swimming system, causing the player to fly up indefinitely. See C-2 for custom liquids 7 -BUTTONS- - Model named _ButtonXY where X is the number of the button and Y is its path + Model named _ButtonXY where X is the number of the button and Y is its path. - Buttons are pressed sequentially, first button will always be pressed first - I.E _Button1 will be the first button to be pressed and _Button2 will be the second button to be pressed + Buttons are pressed sequentially, first button will always be pressed first. + I.E _Button1 will be the first button to be pressed and _Button2 will be the second button to be pressed. - Button Paths are for alternate button directions which will be activated at the same time - I.E two buttons nammed _Button2A and _Button2B will be activated at the same time, pressing one of the buttons disables both + Button Paths are for alternate button directions which will be activated at the same time. + I.E two buttons nammed _Button2A and _Button2B will be activated at the same time, pressing one of the buttons disables both. - Group buttons are a type of buttons where 50% of people have to press it before it's pressed. To make a group button, - insert a StringValue called "Group" inside of a button model + Group buttons are a type of buttons where 50% of players playing in the map have to press it before it's activated. To make a group button, + insert a StringValue called "Group" inside of a button model. You can use the default model for buttons or make your own. To make your own button, you can make it any design. However, it is required that it's in a model called "_Button#", the # being the button number, and there are 2 parts called "Hitbox" and "Light" inside of it, - the hitbox being invisible and having cancollide off + the hitbox being invisible and having cancollide off. 8 -BUTTON EFFECTS - Part with the value added _DestroyX _ExplodeX _FallX _HideX _ShowX where X is button number - Inbuilt function to allow for parts to be changed without scripting, when X button is pressed the effect triggers - _Destroy -Destroys the part - _Explode -Creates an explosion from the part - _Fall -Makes the part unanchored - _Hide -Hides the part - _Show -Shows the part - -]] + Part with the value added _DestroyX _ExplodeX _FallX _HideX _ShowX where X is the button's number that needs to be pressed for the effect to happen. + Inbuilt function to allow for parts to be changed without scripting when X button is pressed: + _Destroy - Destroys the part + _Explode - Creates an explosion from the part + _Fall - Makes the part unanchored + _Hide - Hides the part + _Show - Shows the part + +]] \ No newline at end of file diff --git a/MapKitInstructions.txt b/MapKitInstructions.txt index ca9ad00..5475d04 100644 --- a/MapKitInstructions.txt +++ b/MapKitInstructions.txt @@ -9,7 +9,7 @@ --[[ BASIC MAP FUNCTIONALITY - Every map needs a MapScript, ExitRegion, Spawn, Settings, and buttons as direct childs to the main map model to operate. + Every map needs a MapScript, ExitRegion, Spawn, Settings, and buttons as descendants of the map model in order to operate. Spawn has a side marked as the front, players will spawn facing this direction when they spawn. Buttons have to be numbered progressively. If 2 buttons are named _Button3, you won't be able to press one of them. Likewise, if you have _Button2 and _Button4 but not _Button3, you will not be able to press the fourth button. @@ -34,16 +34,15 @@ --[[ ON THE TOPIC OF WALLJUMPING/WALLRUNNING - To assign a part to be a walljump, insert an ObjectValue with the name of "_WallJump", leaving the Value blank. - - To assign a part to be a wallrun, insert an NumberValue with the name of "_WallRun", and insert how many studs per second you want the player - to move towards local positive X direction in the value. + To assign a part to be a walljump, go to the Properties tab of the instnace you want to be a walljump, add a new attribute called "_actions" and set the attribute value as "WallJump" + To assign a part to be a wallrun, go to the Properties tab of the instnace you want to be a walljump, add 3 new attributes called "_actions", "Momentum", "Speed" and set the "_actions" value as "WallRun", "Momentum" value as the momentum you want to give the players after jumping off of the wallrun and "Speed" value as how fast the players can traverse by the wallrun in studs per seconds. + ]]-- --[[ ON THE TOPIC OF BUTTONS - Buttons are neccessary components for any map. A person can only exit once they've pressed all the buttons in the map. + Buttons are neccessary components for any map. A player can only exit once they've pressed all the buttons in the map. Group buttons are a type of buttons where 50% of people have to press it before it's pressed. To make a group button, insert a StringValue called "Group" inside of a button model. @@ -76,28 +75,18 @@ --MAIN SETTINGS-- "Creator" - Insert the creator(s) of the map here. - "Difficulty" - The difficulty of the map. ("1" = Easy, "2" = Normal, "3" = Hard, "4" = Insane,"5" = Extreme and "6" = Valiant.) + "Difficulty" - The difficulty of the map. ("1" = Easy, "2" = Normal, "3" = Hard, "4" = Insane, "5" = Extreme, "6" = Divine and "7" = Eternal.) "Image" - The thumbnail of the map. "MaxTime" - The time players can exist in a map before exceeding max time in seconds. (Maximum you can set is 7 minutes, aka 420 seconds.) - "Music" - The ID of the music the map is going to use. + "Music" - The ID of the music the map is going to use. (ex. 9923599661) "MusicVolume" - The volume of the map music. (e.g 1 = volume of the roblox audio, 0.5 = halved volume, 2 = double volume) "Name" - The map name. ]]-- ---[[ ADVANCED SCRIPTING EXPLANATION, BASIC SCRIPTING EXPLANATION IS IN MAPSCRIPT +--[[ ADVANCED SCRIPTING EXPLANATION, BASIC SCRIPTING EXPLANATION IS IN MapLib.md MapLib.ButtonPressed -- Is a RBXSignal that is fired when a button is pressed - MapLib.Map -- Reference the map instance - MapLib.btnFuncs [Deprecated] -- indexes of this table will be called when a button is pressed, please use MapLib:GetButtonEvent() instead of this. - - MapLib:GetButtonEvent(buttonID: number): Event(player) -- returns a event that will be fired when the specified buttonID is pressed. - - all of the below functions are non-asynced meaning that they will not yield - - MapLib:Alert(message: string, color: Color3, time: number) -- Will display a alert on all players screens - MapLib:MovePart(part: BasePart, movement: Vector3, duration: number) - MapLib:MovePartLocal(part: BasePart, movement: Vector3, duration: number) - MapLib:SetLiquidType(liquid: BasePart, type: string) -- Sets the liquid type - + MapLib.map -- Reference the map model + ]]-- \ No newline at end of file diff --git a/MapLib.md b/MapLib.md index 5777953..ad9536a 100644 --- a/MapLib.md +++ b/MapLib.md @@ -1,60 +1,131 @@ # Tria.OS Map Library -This does not include deprecated items. +This DOES include deprecated items. (idk which one) ## Methods -### MapLib:Alert(message: `string`, color: `Color3?`, length: `number?`): `nil` + +### MapLib:Alert(message: [`string`](https://create.roblox.com/docs/scripting/luau/strings), color: [`Color3`](https://create.roblox.com/docs/reference/engine/datatypes/Color3), length: [`number`](https://create.roblox.com/docs/scripting/luau/numbers): `nil` Example: + ```lua MapLib:Alert("This is an Alert!", Color3.fromRGB(255, 255, 255), 10) ``` -This function can be used to send a message to everyone, they can be customized by color and duration. - ------------------------------------------------------ -### MapLib:AllowSliding(slideState: `boolean`): `nil` - -Example: -```lua -MapLib:AllowSliding(true) -``` -This function can be used to change sliding state in maps. True enables sliding and false disables sliding. +This function can be used to send a message to everyone. The message can be customized by color and duration. ----------------------------------------------------- -### MapLib:ChangeMusic(musicId: `string|number`, volume: `number?`, startTick: `number?`): `nil` +### MapLib:ChangeMusic(musicId: `string|number`, volume: [`number`](https://create.roblox.com/docs/scripting/luau/numbers), startTick: [`number`](https://create.roblox.com/docs/scripting/luau/numbers): `nil` Example: + ```lua -MapLib:ChangeMusic(8166551934, 0.5, 5) --changes the background music to 8166551934 and plays it with the volume of 0.5 and the starttime of 5. +MapLib:ChangeMusic(8166551934, 0.5, 5) --changes the background music to 8166551934 and plays it with the volume of 0.5 and the start time (in seconds) of 5. ``` + This function can be used to change the current music playing in maps, this also replicates to spectators. ----------------------------------------------------- -### MapLib:GetButtonEvent(buttonId: `number`): `Event` +### MapLib:GetButtonEvent(buttonId: [`number`](https://create.roblox.com/docs/scripting/luau/numbers)): [`RBXScriptSignal`](https://create.roblox.com/docs/reference/engine/datatypes/RBXScriptSignal) Example: + ```lua MapLib:GetButtonEvent(5):Connect(function(player) -- player value here is the player that pressed the button. MapLib:Alert("Button 5 was pressed!", Color3.fromRGB(255, 255, 255), 4) end) ``` + This function is the equivalent of `Lib.btnFuncs[5] = function() end` in Flood Escape 2. It can be used to run functions once a button has been pressed. ----------------------------------------------------- -### MapLib:SetLiquidType(liquid: `BasePart`, liquidType: `string`): `nil` +### MapLib:SetLiquidType(liquid: [`BasePart`](https://create.roblox.com/docs/reference/engine/classes/BasePart), liquidType: [`string`](https://create.roblox.com/docs/scripting/luau/strings)): `nil` + +Example: + ```lua -MapLib:SetLiquidType(MapLib.map._Liquid1, "lava") -- changes Liquid1 to lava. +MapLib:SetLiquidType(MapLib.map._Liquid1, "lava") -- changes Liquid1's liquid type to lava. ``` + This function can be used to change the state of a liquid. There are 3 states you can choose from excluding custom states, these are "water", "acid" and "lava". ----------------------------------------------------- -### MapLib:MovePart(part: `BasePart`, movement: `Vector3`, duration: `number?`): `nil` +### MapLib:Move(moveable: [`PVInstance`](https://create.roblox.com/docs/reference/engine/classes/PVInstance), movement: [`Vector3`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3), duration: [`number?`](https://create.roblox.com/docs/scripting/luau/numbers)): `nil` + +Example: + +```lua +local maplib = game.GetMapLib:Invoke()() +local map = maplib.map +MapLib:Move(map.MovingPart, Vector3.new(12, 0, 0), 3) +``` + +Used to move [`PVInstances`](https://create.roblox.com/docs/reference/engine/classes/PVInstance), replicates to all clients (visible to all players). + +----------------------------------------------------- + +### MapLib:MoveRelative(moveable: [`PVInstance`](https://create.roblox.com/docs/reference/engine/classes/PVInstance), movement: [`Vector3`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3), duration: [`number?`](https://create.roblox.com/docs/scripting/luau/numbers)): `nil` + +```lua +local maplib = game.GetMapLib:Invoke()() +local map = maplib.map +MapLib:Move(map.MovingPart, Vector3.new(12, 0, 0), 3) +``` + +Used to move [`PVInstances`](https://create.roblox.com/docs/reference/engine/classes/PVInstance), does not replicate to all clients (only visible to the player that the script is running for). + +----------------------------------------------------- + +### MapLib:Survive(player: [`string`](https://create.roblox.com/docs/scripting/luau/strings)): `nil` + +Example: + +```lua +local maplib = game.GetMapLib:Invoke()() +local player = game.Players:GetPlayerFromCharacter(other.Parent) +if (player ~= nil) then + maplib:Survive(player) +end +``` + +This function can be used to make the player survive the match without touching ExitRegion. + +----------------------------------------------------- + +### MapLib:MovePart(part: [`BasePart`](https://create.roblox.com/docs/reference/engine/classes/BasePart), movement: [`Vector3`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3), duration: [`number`](https://create.roblox.com/docs/scripting/luau/numbers)): `nil` + +old but still usable, merged into `MapLib:Move()` + +----------------------------------------------------- + +### MapLib:MovePartLocal(part: [`BasePart`](https://create.roblox.com/docs/reference/engine/classes/BasePart), movement: [`Vector3`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3), duration: [`number`](https://create.roblox.com/docs/scripting/luau/numbers)): `nil` + +old but still usable, merged into `MapLib:MoveRelative()` + +----------------------------------------------------- + +### MapLib.MoveModel(moveable: [`Model`](https://create.roblox.com/docs/reference/engine/classes/Model), movement: [`Vector3`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3), duration: [`number`](https://create.roblox.com/docs/scripting/luau/numbers)): `nil` + +old but still usable, merged into `MapLib:Move()` + +----------------------------------------------------- + +### MapLib.MoveModelLocal(moveable: [`Model`](https://create.roblox.com/docs/reference/engine/classes/Model), movement: [`Vector3`](https://create.roblox.com/docs/reference/engine/datatypes/Vector3), duration: [`number`](https://create.roblox.com/docs/scripting/luau/numbers)): `nil` + +old but still usable, merged into `MapLib:MoveRelative()` + +----------------------------------------------------- + +### MapLib:GetFeature(featureName: [`string`](https://create.roblox.com/docs/scripting/luau/strings)) + +`:GetFeature()` is used to get any features listed in [the features list](FeatureLib.md) + +----------------------------------------------------- -### MapLib:MovePartLocal(part: `BasePart`, movement: `Vector3`, duration: `number?`): `nil` +### MapLib:GetPlayers(): [`Tuple`](https://create.roblox.com/docs/scripting/luau/tuples) -### MapLib:GetFeature(featureName: `string`: [`Feature`]: (FeatureLib.md) +`:GetPlayers()` returns a [`Tuple`](https://create.roblox.com/docs/scripting/luau/tuples) containing players currently in a map. diff --git a/README.md b/README.md index 45d470c..c6f7702 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,16 @@ # Tria OS Documentation -This repository has documentation for Tria.OS, feel free to make well written pull requests. + +This repository fork has documentation for TRIA.os, currently being worked on by myself to try to explain TRIA's engine for the beginners. # Beginner -[API Reference](MapLib.md) + +[MapLib Reference Sheet](MapLib.md) \ +[Map kit instructions](MapKitInstructions.txt) \ +[Map kit docs](MapKitDocumentation.txt) \ +[MapLib Source Code](https://github.com/Tria-Studio/Tria-Escape-MapLib/tree/master/src) # Advanced -[Making spectate seamless](SeamlessSpectate.md) \ -[EffectScript](EffectScript.md) + +[Making seamless spectate](SeamlessSpectate.md) \ +[EffectScript](EffectScript.md) \ +[Official Studio scripting documents from Roblox](https://create.roblox.com/docs) diff --git a/SeamlessSpectate.md b/SeamlessSpectate.md index a1c083d..12d0e28 100644 --- a/SeamlessSpectate.md +++ b/SeamlessSpectate.md @@ -1,12 +1,18 @@ # Making spectating seamless + +"seamless" is just "smooth" anyways \ When you make a map you might notice that certain things may cause spectating to act strangely, this can be caused by various things that are documented below. ## Anchoring the player + When you anchor the player it stops the replication of the player, when the player is unanchored it takes a second for the replication to start again which makes it looks like the player is lagging for other players. ### Mitigation + If you want to anchor the player but you also want the effect to be seamless then you need to set the players client position to the desired position every heartbeat. + Example: + ```lua local RunService = game:GetService("RunService") @@ -16,9 +22,9 @@ local anchorPoint = humanoidRootPart.CFrame -- Begin the anchor local heartbeat = RunService.Heartbeat:Connect(function() -- Set the characters Velocity to 0 - humanoidRootPart.AssemblyLinearVelocity = Vector3.new() +humanoidRootPart.AssemblyLinearVelocity = Vector3.new() -- Set the characters CFrame to the saved point - humanoidRootPart.CFrame = anchorPoint +humanoidRootPart.CFrame = anchorPoint end) -- End the anchor @@ -26,7 +32,9 @@ heartbeat:Disconnect() ``` ## Changing the characters position on the server + When you change the position of the character on the server it takes over replication from the client, this causes similar effects to anchoring the player -### Mitigation +### Solution + To make the effect seamless all you need to do is make the teleportation happen on the client, not only will this make the teleportation seamless to other players it will also make the effect more seamless for the player as well. diff --git a/TRIA Assets/TRIA.os Lobby OST 2.ogg b/TRIA Assets/TRIA.os Lobby OST 2.ogg new file mode 100644 index 0000000..9a13e04 Binary files /dev/null and b/TRIA Assets/TRIA.os Lobby OST 2.ogg differ diff --git a/index.html b/index.html new file mode 100644 index 0000000..e6c1c82 --- /dev/null +++ b/index.html @@ -0,0 +1,29 @@ + + +
+ + + +This is coderheck's TRIA.os Mapmaking Documentation repository, forked from the original by TRIA staffs.
+Currently being worked on myself to update this documentation alongside the updates of the main game, and (hopefully), simplified enough for people that have just started making things on ROBLOX and TRIA.os .
+ MapLib methods