Creating a remote event that allows me to choose classes

So I’m creating classes for a game that I’m a dev for. I’ve never done this before and I’m wondering where to start. This is extremely useful information that can be used on things other than class selection, so please, no work arounds.

-- Do not touch. Control's classes and their functions. ask crolaa for permission to change
local classes = game.ServerStorage.Classes
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local event = ReplicatedStorage.classes

local function giorno(player)
	local plr = player
	local model = classes.Giorno.StarterCharacter
	model.Parent = player.StarterPlayer

So i want to be able to fire a remote event like this classevent:FireServer(giorno)
Giorno is where i put the class name to choose. so if i wanted a different class classevent:FireServer(bruno)

Thank you for reading!

1 Like

So instead of creating multiple functions just to clone one character, you could do something like this:

event.OnServerEvent:Connect(function(plr, character)
local model = classes:FindFirstChild(character):Clone()
model.Parent = plr.StarterPlayer

Client would look something like this:


(sorry for the unformatted code, currently doing this on phone)