Getting this error from a script im working on: FireClient: player argument must be a Player object.
Anyone know whats wrong?
--script
local remotes = game:GetService("ReplicatedStorage"):WaitForChild("IRemotes")
local br = remotes:WaitForChild("BroadcastRemote")
local player = game.Players.LocalPlayer
script.Parent.Touched:Connect(function()
print("TouchedBorder")
br:FireClient(player)
end)
--localscript
local remotes = game:GetService("ReplicatedStorage"):WaitForChild("IRemotes")
local br = remotes:WaitForChild("BroadcastRemote")
br.OnClientEvent:connect(function()
script.Parent.Visible = true
wait(3)
script.Parent.Visible = false
end)

1 comment
you can't fire client from a local script