File tree 8 files changed +14
-47
lines changed
8 files changed +14
-47
lines changed Original file line number Diff line number Diff line change 44
44
**Example:**
45
45
```lua
46
46
-- Changes the fog to 100 and the fog color to white
47
- local LightingFeature = Maplib :GetFeature("Lighting")
47
+ local LightingFeature = MapLib :GetFeature("Lighting")
48
48
49
49
LightingFeature:SetLighting({
50
50
FogEnd = 100,
56
56
This function also supports lighting effects to be updated and they will be replicated to specators.
57
57
```lua
58
58
-- Changes the fog to 100 and the fog color to white and makes everything monochrome.
59
- local LightingFeature = Maplib :GetFeature("Lighting")
59
+ local LightingFeature = MapLib :GetFeature("Lighting")
60
60
61
61
LightingFeature:SetLighting({
62
62
FogEnd = 100,
79
79
and then we can parent it back to lighting when we need it.
80
80
81
81
```lua
82
- local LightingFeature = Maplib :GetFeature("Lighting")
82
+ local LightingFeature = MapLib :GetFeature("Lighting")
83
83
84
84
--Disables the atmosphere effect
85
85
LightingFeature:SetLighting({}, {
Original file line number Diff line number Diff line change 46
46
**Example:**
47
47
```lua
48
48
-- Loads an UI for everyone in the round
49
- local PlayersFeature = Maplib :GetFeature("Players")
49
+ local PlayersFeature = MapLib :GetFeature("Players")
50
50
local PlayerUI = MapLib:GetFeature("PlayerUI")
51
51
52
52
local ui = map:WaitForChild("MyGUI")
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ local Players = {}
25
25
**Example:**
26
26
```lua
27
27
--Teleports all players ingame to map.Destination.
28
- local PlayersFeature = Maplib :GetFeature("Players")
29
- local TeleportFeature = Maplib :GetFeature("Teleport")
28
+ local PlayersFeature = MapLib :GetFeature("Players")
29
+ local TeleportFeature = MapLib :GetFeature("Teleport")
30
30
31
31
for _, player in pairs(PlayersFeature:GetPlayers()) do
32
32
TeleportFeature:Teleport(player, map.Destination.Position)
51
51
**Example:**
52
52
```lua
53
53
--Teleports all players that are within 5 studs from map.Spawn.
54
- local PlayersFeature = Maplib :GetFeature("Players")
55
- local TeleportFeature = Maplib :GetFeature("Teleport")
54
+ local PlayersFeature = MapLib :GetFeature("Players")
55
+ local TeleportFeature = MapLib :GetFeature("Teleport")
56
56
57
57
for _, player in pairs(PlayersFeature:GetPlayersInRadius(map.Spawn.Position, 5)) do
58
58
TeleportFeature:Teleport(player, map.Destination.Position)
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ local Settings = { context = "client" }
32
32
**Example:**
33
33
```lua
34
34
-- Changes the camera FOV to an arbitrary number and then sets it back to the saved settings value.
35
- local SettingsFeature = Maplib :GetFeature("Settings")
35
+ local SettingsFeature = MapLib :GetFeature("Settings")
36
36
37
37
local camera = workspace.CurrentCamera
38
38
Original file line number Diff line number Diff line change 28
28
29
29
**Example:**
30
30
```lua
31
- local SkillsFeature = Maplib :GetFeature("Skills")
31
+ local SkillsFeature = MapLib :GetFeature("Skills")
32
32
33
33
SkillsFeature:ToggleSliding(false)
34
34
task.wait(5)
52
52
53
53
**Example:**
54
54
```lua
55
- local SkillsFeature = Maplib :GetFeature("Skills")
55
+ local SkillsFeature = MapLib :GetFeature("Skills")
56
56
57
57
SkillsFeature:ToggleAirDive(false)
58
58
task.wait(5)
Original file line number Diff line number Diff line change @@ -28,8 +28,8 @@ local Teleport = {}
28
28
**Example:**
29
29
```lua
30
30
--Teleports all players ingame to map.Destination and makes the camera face the front.
31
- local PlayersFeature = Maplib :GetFeature("Players")
32
- local TeleportFeature = Maplib :GetFeature("Teleport")
31
+ local PlayersFeature = MapLib :GetFeature("Players")
32
+ local TeleportFeature = MapLib :GetFeature("Teleport")
33
33
34
34
for _, player in pairs(PlayersFeature:GetPlayers()) do
35
35
TeleportFeature:Teleport(player, map.Destination.Position, true)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ function MapLib:GetFeature(featureName: string)
312
312
if feature .context == " client" and IS_SERVER or feature .context == " server" and not IS_SERVER then
313
313
error ((" Feature '%s' can only be used on the '%s'" ):format (featureName , feature .context ), 2 )
314
314
end
315
- -- Ensures the feature is called with the maplib object for said map
315
+ -- Ensures the feature is called with the MapLib object for said map
316
316
return feature .new and feature .new (currentMapLib ) or feature
317
317
else
318
318
error ((" Cannot find feature '%s'" ):format (featureName ), 2 )
You can’t perform that action at this time.
0 commit comments