Minecraft-like Roblox block game rblx.games/135624152691584
roblox roblox-game rojo
at main 49 lines 1.0 kB view raw
1return { 2 Name = "resyncchunk", 3 Aliases = {"resyncc"}, 4 Description = "Resync a chunk (and optional radius) for a player.", 5 Group = "Debug", 6 Args = { 7 { 8 Type = "player", 9 Name = "player", 10 Description = "Player to resync" 11 }, 12 { 13 Type = "integer", 14 Name = "cx", 15 Description = "Chunk X" 16 }, 17 { 18 Type = "integer", 19 Name = "cy", 20 Description = "Chunk Y" 21 }, 22 { 23 Type = "integer", 24 Name = "cz", 25 Description = "Chunk Z" 26 }, 27 { 28 Type = "integer", 29 Name = "radius", 30 Description = "Radius around the chunk", 31 Optional = true, 32 Default = 0 33 } 34 }, 35 Run = function(context, player, cx, cy, cz, radius) 36 local tickRemote = game:GetService("ReplicatedStorage"):WaitForChild("Tick") 37 local r = radius or 0 38 local count = 0 39 for y = -r, r do 40 for x = -r, r do 41 for z = -r, r do 42 tickRemote:FireClient(player, "C_R", cx + x, cy + y, cz + z, 0, 0, 0, 0) 43 count += 1 44 end 45 end 46 end 47 return ("Resync sent to %s (%d chunks)"):format(player.Name, count) 48 end 49}