I have made an event and I want it so that it makes the player run a command that does something serverside, is there a way to make a player run a command or is there a different way to do a client to server interaction?
Announcement
Collapse
No announcement yet.
Making a player run a chat command
Collapse
This topic is closed.
X
X
-
From what i've seen, I haven't personally been able to purchase the game and play around with the functions they have made, however from experience I know RemoteEvents are used for client > server communications, but the things done in chat is server-sided anyways, so all you'd have to do is run code like this on a server file
Code:function HelloCommand(plr) AddPlayerChat(plr, "Hello there "..GetPlayerName(plr)) end AddCommand("hello", HelloCommand)
-
There's no need to force a player to run a chat command, just make the chat command call a function, then you can call that function whenever you want to achieve the same affect as the command would.Originally posted by flyingpigbaby View PostI mean making the player run the chat command automatically. e.g. the player clicks a button and then it makes them say a chat command.
Comment

Comment