I want to check whether a character is in a Region3 at a certain time on the server, so I made a remote event called FloorCheck. Now, I put this in my main Script when I want to check:
if game.ReplicatedStorage:FindFirstChild("FloorCheck") then
print("FloorCheck exists")
end
game.ReplicatedStorage.FloorCheck:FireAllClients()
Here is what I put in a LocalScript:
script.Parent.FloorCheck.OnClientEvent:Connect(function()
print("Recieved FloorCheck RemoteEvent")
local RegionThree = Region3.new(564.523, 3.261, 23.901,518.588, 8.317, 57.639)
local Parts = workspace:FindPartsInRegion3(RegionThree)
if table.find(Parts, game.Players.LocalPlayer.Character.HumanoidRootPart)==nil then
game.Players.LocalPlayer.Character.Humanoid.Health=0
end
end)
Now I see FloorCheck exists but no Recieved FloorCheck RemoteEvent in the output.
Why? How can I fix this?

1 comment
put the local script in starter player scripts (do like game.repstorag.floorcheck.onclientevent). i think you would also want the fireallclients line inside the if statement