How Do I control a player character?

You can write your topic however you want, but you need to answer these questions:

  1. What do you want to achieve? Keep it simple and clear!

I am trying to control a player character like the ;control command in HD admin

  1. What is the issue? Include screenshots / videos if possible!

I don’t know how

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?.
    Search

I don’t speak English very good so I hope you know what I want

This is not how the forums work.

If you cannot provide

A: An example of code you have written

and/or

B: A detailed explanation of exactly what your code is intended to do and what part(s) you’re stuck on

Then nobody is going to be able to solve whatever issue it is that you’re facing in your script.

This problem isn’t a problem. It’s a request.

Nobody is going to sit down for three days and write an entire console command system just because you asked on the official forum.

Go read and watch some tutorials and learn how to do it yourself, or pay up.

I just want an example of how I can make it
And I found no tutorials on how to do it

I felt my last post was a little harsh so here’s a little something to get you started on chat commands

Put a RemoteEvent in ReplicatedStorage and name it ‘Chat’

PlayerScripts (LocalScript):

game.Players.LocalPlayer.Chatted:Connect(function(msg)
	game['ReplicatedStorage'].Chat:FireServer(msg)
end)

ServerScriptService (Script):

game['ReplicatedStorage'].Chat.OnServerEvent:Connect(function(plr,msg)
	local function player()
		for _,p in ipairs(game.Players:GetChildren()) do -- A list of all the players in the server.
			return p -- Checks all players for the desired one and returns them.
		end
	end
	if msg.find(msg,';control '..player().Name) then -- this looks for the command and the player's name they want to control
		local dummy = player().Character
		dummy.Humanoid.DisplayName = tostring(player().DisplayName..' [UNDER CONTROL]')
		-- Bind controls here.
		wait(20)
		dummy.Humanoid.DisplayName = player().DisplayName
	end
end)

Edit: As for the actual control-binding, as I said, you’re asking for A LOT

1 Like

Dude i suggest going inside the module itself and looking at the code ITS THAT SIMPLE and don’t get me started that you broke one rule because you don’t care about TOS

2 Likes

“Please do not ask people to write entire scripts or design entire systems for you.”