Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to fix "Fire is not a valid member of RemoteEvent?

Hi, I am making a game and in this game you sell stuff. With the selling I have this error.

" Fire is not a valid member of RemoteEvent "ReplicatedStorage.BindableEvents.Sell"

This is my script :

script.Parent.Touched:Connect(function(hit) if hit.Parent:FindFirstChild("Humanoid") then local player = game.Players:GetPlayerFromCharacter(hit.Parent)

	game.ReplicatedStorage.BindableEvents.Sell:Fire(player)
end

end)

1 answer

✓ Accepted answer

If you're firing a remote event to a server, you do:

remoteEvent:FireServer(player)

You don't need to add the player argument at the end as it automatically sends over the player when you fire it.

--Nevermind about the last part, just read the bit above the code on the bottom. In this case, you do need to send over the argument.

4 comments

0

If you don't mind me asking, where would I replace that code for? Like what line of code do I replace for the code you commented. I'm a little confused.

0

Instead of

0

Instead of game.ReplicatedStorage.BindableEvents.Sell:Fire(player) do game.ReplicatedStorage.BindableEvents.Sell:FireServer(player)

0

Sorry for asking you so much but now I am getting this error: FireServer can only be called from the client

This discussion is preserved as it was. New answers, comments, and votes are closed.