Must only be called on server scripts error

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!
    Make an editable booth.
  2. What is the issue? Include screenshots / videos if possible!
    There is a must only be called on server scripts error
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub? None of them matched for my error.

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

script.Parent.MouseButton1Click:Connect(function()
	local playerId = game.Players:GetUserIdFromNameAsync(game.Players.LocalPlayer.Name)
	local TS = game:GetService("TextService")
	local filteredOutput = TS:FilterStringAsync(script.Parent.Parent.TextBox.Text, playerId, Enum.TextFilterContext.PublicChat)
	game.ReplicatedStorage.BoothEditEvent:FireServer(filteredOutput) -- This is the part where the error triggers. Even if i am using the correct fire function.
	script.Parent.Parent.Parent.Frame.Visible = false
end)

Please do not ask people to write entire scripts or design entire systems for you. If you can’t answer the three questions above, you should probably pick a different category.

I think it’s pretty obvious. You can’t call FilterStringAsync on client.

Do I have to seriously make another remoteevent to fix this?

Yep, that’s the only way. Server only for that function.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.