You can write your topic however you want, but you need to answer these questions:
What do you want to achieve?
I am trying to do :FireServer() from a local script to pass some info the server.
What is the issue?
However, the event is not firing.
What solutions have you tried so far?
I tried using print statements to debug the error. Everything in client side works. The server side print doesn’t work and there are no errors in the console
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!
Here is the Local Script:
local plrs = game:GetService("Players")
local plr = plrs.LocalPlayer
local db = false
local event = game.ReplicatedStorage:WaitForChild("TeamUp")
script.Parent.MouseButton1Click:Connect(function()
if db == false then
db = true
local inviter = plr.Name
local receiver = script.Parent.Text
print("Sent")
local val = plr.PlrConfig:WaitForChild("CurrentParty")
event:FireServer(receiver)
print(inviter.." invited "..receiver)
script.Parent.BackgroundColor3 = Color3.fromRGB(0,255,0)
print('Color Changed')
wait(2)
db = false
script.Parent.BackgroundColor3 = Color3.fromRGB(52, 116, 255)
print("Color Changed")
end
end)
Here is the server script:
local event = game.ReplicatedStorage:WaitForChild("TeamUp")
event.OnServerEvent:Connect(function(receiver)
print("Done Invited")
end)
Are you also sure that the ServerScript has access to the RemoteEvent? If you put a print after the WaitForChild in the Script, does it appear? You would normally be getting a warning that the object was never found, but I’m just making sure.