Training "!begin" command GUI

Hi! I’m working on my ROBLOX group, at the main training center and I’m looking on adding a training rules GUI at the bottom of the screen and locking the player camera to a position.

At this moment, I don’t have any skill at scripting, so all answers will be very helpful!

  1. What do you want to achieve? A appearing GUI when you run a command, for example: “!begin” and a text down of your screen appears and locks you the camera to a part/person by an animation, then when it ends, the camera returns back to the person.

  2. What is the issue? I don’t have any scripting & UI skills and any help will help me a lot.

  3. What solutions have you tried so far? I have looked over some topic here and I didn’t found the answer that I want to bring to my group.

If it’s possible, I wanna add an animation when the text is appearing.

2 Likes

You can use either TextChatCommands (see an example here) or the Player.Chatted event. For an animation, you can use TweenService to tween the MaxVisibleGraphemes property of a text element.

I would recommend starting with some tutorials though. Roblox has a coding fundamentals series (see also this luau overview) and a core curriculum course, but there are plenty on YouTube as well.

2 Likes

I’ve created the main camera command, but the main problem is that it automatically brings the camera to the part seletcted, there is any option to bring the player’s camera to the part with any animation?

You can use TweenService for that.

Example
local TweenService = game:GetService("TweenService")
local Camera = workspace.CurrentCamera :: Camera
Camera.CameraType = Enum.CameraType.Scriptable
TweenService:Create(Camera, TweenInfo.new(2, Enum.EasingStyle.Exponential, Enum.EasingDirection.Out), {CFrame = CFrame.new(0, 10, 0)}):Play()

The command i’m using is a plugin of Basic Admins Essentials 2.0. How should I integrate it on the plugin?

local replicatedstorage = game:GetService("ReplicatedStorage")

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] 
	
	local pluginName = 'stagecamera'
	local pluginPrefix = Prefix
	local pluginLevel = 2
	local pluginUsage = "<User(s)>"
	local pluginDescription = "Set Camera of players at stage."
	
	local function pluginFunction(Args)
		local Player = Args[1]
		if Args[3] then
			local Victims = returnPlayers(Player, Args[3]) if not Victims then return end
			for a,b in pairs(Victims) do
				replicatedstorage.RemoteEvents.SetCamera:FireClient(b, game.Workspace["Training Center"].Cameras.Camera5.CFrame)
			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

If you’re talking about how to implement the animation, you’ll need to put it in whatever LocalScript receives this event. The server can’t modify a player’s camera.

1 Like

Hey! Feel free to ad me in discord(BodieBlox) and I will be happy to help you with this!

Sure! I’ve sent you a friend request, thanks! <3