I have a Tool called C4
. When ever it explodes it sends a RemoteEvent
called Explosion. Here is what it looks like:
game.ReplicatedStorage.Explosion:Connect(function (Player, HandleName) game.Workspace:WaitForChild(HandleName) end)
Even though a Part named Handle
exists in Workspace
, it throws me this error:
Handle is not a valid member of Workspace "Workspace"
The only possible issue is that Handle
is being created in a LocalScript
.
Any Ideas?
When RemoteEvents are fired from the client, detect them from the server using onServerEvent. Like this:
game.ReplicatedStorage.Explosion.OnServerEvent:Connect(function(Player, HandleName) game.Workspace:WaitForChild(HandleName) end)
Furthermore, instances created from the Client cannot be seen by the Server, so you would have to create the Handle via a ServerScript