I usually don't have trouble with this but I am sure i'm missing something obvious. The script is as follows:

Server Script:

ReplicatedStorage = game:GetService("ReplicatedStorage")
Players = game:GetService("Players")
script.Parent.Touched:Connect(function(hit)
	print("touched")
	if hit.Parent:FindFirstChild("Humanoid") ~= nil then
	local character = hit.Parent
	local player = Players:GetPlayerFromCharacter(character)
	ReplicatedStorage.Zone:FireClient(player)
	else
	
	end
	
end)

LocalScript:

ReplicatedStorage = game:GetService("ReplicatedStorage")
Players = game:GetService("Players")
local player = Players.LocalPlayer
ReplicatedStorage.Zone.OnClientEvent:Connect(function()
	print("Event")
end)


5 comments

0

This should technically work.

0

That's what I thought. It isn't though. It doesn't print or give an error.

0

Maybe try labeling the RS and Players with a local, it may fix the issue.

0

Hmm maybe try getting rid of the 5th line in the Server Script and type in, "if hit.Parent:FindFirstChild("Humanoid") then". Because if you do it with "~= nil" I'm assuming that if the Player is touching it, it won't do anything. Just try it out and let me know.

1

Oh and also try a WaitForChild when waiting for Zone.