Skip to content

Commit

Permalink
Fix :removecamera not working (#1746)
Browse files Browse the repository at this point in the history
* Fix `:removecamera` not working

* Update Remote.luau

* Nevermind
  • Loading branch information
ccuser44 authored Nov 20, 2024
1 parent c25fdb8 commit ccbfede
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
4 changes: 2 additions & 2 deletions MainModule/Client/Core/Remote.luau
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ return function(Vargs, GetEnv)
local RemoteEvent = Core.RemoteEvent
local limits = Process.RateLimits
local limit = limits and limits.Remote or 0.02
local extra = table.unpack(...)
local extra = table.pack(...)
local returns

if RemoteEvent and RemoteEvent.Function then
Expand Down Expand Up @@ -446,7 +446,7 @@ return function(Vargs, GetEnv)
local returns
local key = service.HttpService:GenerateGUID(false)
local waiter = service.New("BindableEvent")
local event = service.Events[key]:Connect(function(...) print("WE ARE GETTING A RETURN!") returns = table.unpack(...) waiter:Fire() task.wait() waiter:Fire() waiter:Destroy() end)
local event = service.Events[key]:Connect(function(...) print("WE ARE GETTING A RETURN!") returns = table.pack(...) waiter:Fire() task.wait() waiter:Fire() waiter:Destroy() end)

Remote.PendingReturns[key] = true
Remote.Send("GetReturn", com, key, ...)
Expand Down
13 changes: 5 additions & 8 deletions MainModule/Server/Commands/Moderators.luau
Original file line number Diff line number Diff line change
Expand Up @@ -1428,17 +1428,14 @@ return function(Vargs, env)
Description = "Deletes the camera if it exists";
AdminLevel = "Moderators";
Function = function(plr: Player, args: {string})
for i,v in Variables.Cameras do
if string.lower(args[1]) == v.Name then
local cam = workspace:FindFirstChild(v)

Variables.Cameras[i] = nil

if cam and cam:IsA("Part") then
cam:Destroy()
for i, v in Variables.Cameras do
if string.sub(string.lower(v.Name), 1, #args[1]) == string.lower(args[1]) then
if v.Brick then
v.Brick:Destroy()
end

Functions.Hint(`Deleted camera {v.Name}`, {plr})
table.remove(Variables.Cameras, i)
end
end
end
Expand Down

0 comments on commit ccbfede

Please sign in to comment.