InvokeServer is not a valid member of RemoteEvent

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!
    I want to achieve where it logs to the discord server as a webhook when you sign it.
  2. What is the issue? Include screenshots/videos if possible!
    As soon as you sit down on the seat, it shows the error.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?

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!

local GUI = script.Parent.Parent.Parent
local Nametag = script.Parent.Parent.NameLabel


script.Parent.MouseButton1Click:Connect(function()
	script.Parent.Pencil:play()
	repeat wait(.2)
		Nametag.TextTransparency = Nametag.TextTransparency - .1
	until
	Nametag.TextTransparency <= 0
	wait(1)
	GUI:Destroy()
end)

game.ReplicatedStorage.RemoteEvent:InvokeServer()
local HttpService = game:GetService("HttpService")
ReplicatedStorage = game.ReplicatedStorage

script.Parent.Changed:Connect(function()
	if script.Parent.Occupant then
		local plr = game.Players:FindFirstChild(script.Parent.Occupant.Parent.Name)
		if plr then
			local new = script.Parent.ScreenGui:Clone()
			new.Parent = plr.PlayerGui
			new.Enabled = true
		end
	end
end)

function LogToDiscord(user, signed)
local success = pcall(function()
local data = {
			  content = user.Name .. " has "..signed.." the Recruit Desk! (BY SIGNING YOUR NAME BELOW, YOU ARE AGREEING TO TERMS OF GIVING YOUR SERVICE TO THE USMC AND EVERYTHING YOU DO WILL BE WATCHED DURING THIS COURSE OF TRAINING).";
			  username = user.Name;
			  avatar_url = game.Players:GetUserThumbnailAsync(user.UserId, Enum.ThumbnailType.HeadShot, Enum.ThumbnailSize.Size100x100);
			}
   HttpService:PostAsync("https://discordapp.com/api/webhooks/*****/*****", HttpService:JSONEncode(data))
end)
end

ReplicatedStorage.RemoteFunction.OnServerInvoke = function(user)
	if user then
		LogToDiscord(user, "signed")
	end
end

This is the script (its a server script) where it logs it to the discord via webhook upon pressing the text button from the LocalScript which then fires the script to send it, but it’s not sending it.

This is the local script inside the text button where you press it to sign your username.

Hierarchy:
image

you can’t invoke remote events, only remote functions

Then how would I be able to do all this?

You have to use the function RemoteEvent:FireServer() (30 chars)

So I change this to:

game.ReplicatedStorage.RemoteEvent:FireServer()

Also note that this is in a LocalScript.

Yes! Exactly that! (30 chaaaaars)
Besides, since your not returning anything, its better to use remoteevents anyway.

Is the Server Script good then?

Uhh well since the script is actually using function, you have to change this

ReplicatedStorage.RemoteFunction.OnServerInvoke = function(user)
	if user then
		LogToDiscord(user, "signed")
	end
end

to this

ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(user)
	if user then
		LogToDiscord(user, "signed")
	end
end)

Yes, but I want it to only fire that to the webhook every-time someone signs it, not every-time it gets connected? Or is that pretty much the same way?

Pretty much the same way
Report back if it was a success or error please.

BTW, Next time before you go to devforum, try checking out stuff on devhub, its really helpful and could help you out alot.

It worked, thanks. (10 charsss)

Nice, if someone solved the problem for you, please mark them as the solution.