Why does this script only fire for 1 person in a 2 player server?

That wouldn’t work, the function should only disconnect if the giveplot event fires.
Otherwise it would disconnect before it has a chance of running.

1 Like

@Prof_4K Is correct, It will disconnect before it had a chance to do anything. Setting connections to variables works fine.

As I also mentioned earlier i wasn’t sure therefore i asked it to make sure it’s correct and i can also clear doubts

@CALlBRE’s is probably the most efficient so far, although the problem wasn’t necessarily with efficiency, it was about getting the code to work. I believe that, although it wasn’t very efficient, your script should be working fine. Could we see what’s going on in the server?

  • Connection should not be local
  • Try running in Test mode w/ multiple players and look for red text in the players’ output–For instance
    is OwnsAPlot already parented to the Player?

It works thanks guys! Really appreciate been stuck on that for awhile lmao

1 Like

That shouldn’t be a problem; it’s not being used anywhere else anyway.

You should mark the appropriate post as solution for future reference

I will in a second. Hold on lmao

I mentioned it so people will not think that:

local Connnection = game.Players.LocalPlayer.OwnsAPlot:GetPropertyChangedSignal("Value"):Connect(function()
...

works (they probably won’t, as Studio will put a red underline if you try it)

(The separate declaration is very important in this case.)

1 Like