Hi!
Is it possible that we could make the chat command for the camera into a Basic Admin command?
Hi!
Is it possible that we could make the chat command for the camera into a Basic Admin command?
Yes, you could.
Here is something I’ve done in the past, you need to put this inside of the Plugins folder of BAE:
Make sure to read code tags
local Plugin = function(...)
local Data = {...}
-- Included Functions and Info --
local remoteEvent = Data[1][1]
local remoteFunction = Data[1][2]
local returnPermissions = Data[1][3]
local Commands = Data[1][4]
local Prefix = Data[1][5]
local actionPrefix = Data[1][6]
local returnPlayers = Data[1][7]
local cleanData = Data[1][8] -- cleanData(Sender,Receiver,Data)
-- Practical example, for a gui specifically for a player, from another player
-- cleanData(Sender,Receiver,"hi") -- You need receiver because it's being sent to everyone
-- Or for a broadcast (something everyone sees, from one person, to nobody specific)
-- cleanData(Sender,nil,"hi") -- Receiver is nil because it is a broadcast
-- Plugin Configuration --
local pluginName = 'cam'
local pluginPrefix = Prefix
local enabled = False
local pluginLevel = 3 --Replace this to the level you want it to be at.
local pluginUsage = "<User(s)>" -- leave blank if the command has no arguments
local pluginDescription = "Give camera view"
-- Example Plugin Function --
local function pluginFunction(Args) -- keep the name of the function as "pluginFunction"
local Player = Args[1]
if Args[3] then
local Victims = returnPlayers(Player, Args[3]) if not Victims then return end
local combinedVictims = ''
for a,b in pairs(Victims) do
if combinedVictims == '' then
combinedVictims = b.Name
else
combinedVictims = combinedVictims..', '..b.Name
end
end
for a,b in next,Victims do
if enabled == False then
game.ReplicatedStorage.Cutscene:FireClient(true)
enable = True
else
game.ReplicatedStorage.Cutscene:FireClient(false)
enable = False
end
end
end
end
-- Return Everything to the MainModule --
local descToReturn
if pluginUsage ~= "" then
descToReturn = pluginPrefix..pluginName..' '..pluginUsage..'\n'..pluginDescription
else
descToReturn = pluginPrefix..pluginName..'\n'..pluginDescription
end
return pluginName,pluginFunction,pluginLevel,pluginPrefix,{pluginName,pluginUsage,pluginDescription}
end
return Plugin
The command should be ran as: cam all
.
So do I just follow all the steps in the video and at the end copy and paste this as a BAE plugin?
Yes, there may be a few bugs as this is a script from my very old hotel. Let me know if you encounter any issues.
Where would I paste the Script?
Create a new script under plugins.
I mean, where would I paste the Script to allow the Cam to Work.
You would paste the script in the script you created under plugins.
You create a script inside of Plugins, and paste the entire script in there.
That’s the entire script, you need to follow the rest of the video to understand.
I got no idea what your saying
Go to bae, open it up, open the folder, open plugins click on the folder click on the + icon, add a script. Then copy and paste the script above into the script you just created.
Strange, is there anything in output?
Can you show me the content of local script?
local player = game.Players.LocalPlayer
local camera = game.Workspace.Camera
wait(2)
game.ReplicatedStorage.Cutscene.OnClientEvent:Connect(function(Start)
if Start == true then
camera.CameraType = "Scriptable"
camera.CFrame = game.Workspace.Cam.CFrame
else
camera.CameraSubject = player.Character.Humanoid
camera.CameraType = "Custom"
camera.CFrame = player.Character.Head.CFrame
end
end)
Aha, so here is the issue, we have no handling.
I’ve gone ahead and edited the original post.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.