How can I run a script

I want to run a simply script from serverscriptservice for example

	
	local args = {
		[1] = "Hello !",
		[2] = "All"
	}

	game:GetService("ReplicatedStorage").DefaultChatSystemChatEvents.SayMessageRequest:FireServer(unpack(args))

How can I do it?

:FireServer() is only for LocalScript to send signals to server. If you are using a LocalScript, put it in either StarterPlayerScripts if you want it to start executing the moment the player is loaded, or StarterCharacterScripts to make it execute every time the player’s character is loaded.

If you are using a server script (Or just “Script”), putting it in ServerScriptService will do. The only problem I see here is the end at the bottom line and :FireServer() that needs to be fixed.

1 Like