Hi, I am making a simulator game and in this game you need to sell stuff. I can't get the sell working because I get this error: "FireServer can only be called from the client" I got this error when I fixed another issue. Here is my code:
script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent)
game.ReplicatedStorage.BindableEvents.Sell:FireServer(player)
end
end)

5 comments
This means FireServer can only be called on a LocalScript.
So do I change the script to a LocalScript? Because I did that and now no error is coming up but nothing is working they way I want it to work.
Is this Script in the Players GUI? if So it will need a LocalScript
Its in a sell model. So when you go on the model. It will sell something you have for currency.
read the error