local event = game.ReplicatedStorage.Events["Enter/ExitCaveEvent"]
script.Parent.Touched:Connect(function(player)
event:FireClient(player)
end)
When it fires server, the output says this
20:06:47.589 - FireClient: player argument must be a Player object
I named everything correct, I don't know why this is happening!!! Can someone help me? Here is the client code
local event = game.ReplicatedStorage.Events["Enter/ExitCaveEvent"]
event.OnClientEvent:Connect(function(player)
if workspace.CaveStuff.DetectionBrick.ShowEnter == true then
workspace.CaveStuff.DetectionBrick.Script.Disabled = true
print("Enter")
wait(0.5)
end
if workspace.CaveStuff.DetectionBrick.ShowEnter == false then
workspace.CaveStuff.DetectionBrick.Script.Disabled = true
print("Exit")
end
end)
ty NSMascot

5 comments
-1, u literally restated what i wrote 30 minutes after i said it.
and firing player.Parent might still give an error, based on which part hit.
First of all, you explained what the problem was. I provided a script, you didn't. Second, I have never encountered any problems using .Parent that way. In fact there are no parts in character that have a a parent other than the character. I try to be nice but it sounds to me that you just don't like me giving a better answer because you're worried that mine will be marked instead of yours
I really don't see why I'm being downvoted for providing a correct answer.
thankyou for the answer, i have been stuck on that for ages