I'm not used to using this function and I have no idea how to fix this error.
I'm using a serverscript under a TextButton that when you click it, it fires to the client to play a sound but for some reason it doesn't work
Server Script:
local RS = game:GetService("ReplicatedStorage")
local Events = RS:WaitForChild("Events")
local ClickEvent = Events:WaitForChild("ClickEvent")
local Button = script.Parent
Button.MouseButton1Click:Connect(function()
ClickEvent:FireClient()
end)
Local Script:
local RS = game:GetService("ReplicatedStorage")
local Events = RS:WaitForChild("Events")
local ClickEvent = Events:WaitForChild("ClickEvent")
ClickEvent.OnClientEvent:Connect(function(plr)
print("work")
end)