Alright, I am making an audio system, and I wanna make sure it works with printing, but instead, it prints "nil" Okay, so here's my client part of the script:
local SoundService = game:GetService("SoundService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local revent = ReplicatedStorage.SoundEvent
local frame = script.Parent
local song1 = frame.song1
local cooldown = 7
local debounce = false
local song1id = 2518263386--This is what I want the normal script to print just to test.
local player = game.Players.LocalPlayer
song1.MouseButton1Click:Connect(function(player,song1id)
if not debounce then
debounce = true
revent:FireServer(player,song1id)--I fire the songid too.
wait(cooldown)
debounce = false
end
end)
That's the localscript, and this below is the actual script:
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local revent = ReplicatedStorage.SoundEvent
local soundbox = script.Parent.Sound
local audio = script.Parent.Sound.SoundId
local function test(player,song1id)
audio = song1id
print(song1id)
end
revent.OnServerEvent:Connect(test)
When I click the gui button, instead I just get "nil", can somebody tell me why?

4 comments
Take out the player argument from FireServer()?
https://developer.roblox.com/en-us/api-reference/function/RemoteEvent/FireServer/index.html
A lot of the people who I talked to yesterday about something similar said player is always supposed to be there, and be first. I might make a logs system too later, so I'm keeping it.
Now it prints my username @jalbraek