nanos-world / issues

Issue Tracker for nanos world
9 stars 1 forks source link

`Player` "Spawn" event called twice clientside #920

Closed Timmy-the-nobody closed 1 year ago

Timmy-the-nobody commented 1 year ago

Prerequisites

Your Environment

Description

The Player class "Spawn" event is called twice clientside when a new player joins the server

Steps to reproduce the behavior

Put this in Client/Index.lua and Server/Index.lua so you can see the wrong behavior of the event on the client

Player.Subscribe("Spawn", function(ply)
    Console.Log(ply)
end)

Expected behavior

Event called only one time per connection clientside, like how it works serverside

Actual behavior

The event is called twice clientside

gtnardy commented 1 year ago

Fixed it, thanks for creating the issue!