I want to play a sound from a normal script but I want to appear on a client only im trying to fire an event to fix it these are the scripts:
You need to provide this function with a player who should receive this. Remove the square brackets
Oh ok ill try that and put this as a solution if it works thank you
what is a player instance is it like plr in brackets?
Player Instance is simply just the
Player object, or
game.Players["4HM4DJ'] if that clarifies a bit more
You’d need to find some way to get the
Player inside a server script, which is the thing here
You have several different Events & functions that you can use that could help you get it, but it depends on when the Event is fired
can i use when the player joins the game? i tried putting plr but it still didnt work?
It should look something like this:
Yeah thats what i did… this is the normal script (a part of it)
LocalScript print anything when it’s fired?
Nope but i get an error " 22:31:44.898 Argument 1 missing or nil - Server -"
Try just removing the
PlayerAdded event, I think it’s defined as
nil due to there being 2 functions tightening it
local PlayerBasketCapacity = game.ServerStorage.Baskets.StarterBasket.MaxCapacity
if plr.PlayerDataFolder.PlayerFoodAmount.Value >= PlayerBaskerCapacity.Value then
print("Bucket Capacity is full!")
plr.PlayerDataFolder.CanCollect.Value = false