I'm trying to fire from server to client. The part I have in the workspace:
Workspace
Part
Script
TextButton
And in the StarterGui:
StarterGui
ScreenGui
Frame
LocalScript
The Script:
local button = script.Parent.TextButton
local remEvent = game:GetService("ReplicatedStorage").RemoteEvent
button.MouseButton1Click:Connect(function(player)
remEvent:FireClient(player)
end)
The LocalScript:
local remEvent = game:GetService("ReplicatedStorage").RemoteEvent
remEvent.OnClientEvent:Connect(function(player)
script.Parent.Frame.Visible = true
end)
So when a player clicks the text button I wan't the Frame to become visible for the player. The server script doesn't seem to understand what the player is, though I have to put the player there or I get an error "Argument 1 missing or nil". I have thought that I could maybe define the player with a "PlayerAdded" function, but I'm not sure if I want to use it there even if it works.

2 comments
Thank you so much!!
Happy to help!