Well im trying to make this script and I have filtering enabled on and for some reason in the onclientevent part i put in player and in the local script it does not get that but instead thinks its the next variable.
Server Script:
1 | game.ReplicatedStorage.ItemLook:FireClient(player, script.Parent.NameValue.Value, script.Parent.CashValue.Value, script.Parent.Desc.Value) |
Local Script
1 | game.ReplicatedStorage.ItemLook.OnClientEvent:connect( function (player, name, cash, desc) |
Please help!
Hey outlook1234567890,
01 | ---- SERVER SCRIPT ---- |
02 | game.ReplicatedStorage.ItemLook:FireClient(player, player.Name, script.Parent.NameValue.Value, script.Parent.CashValue.Value, script.Parent.Desc.Value) |
03 | ---- SERVER SCRIPT ---- |
04 |
05 |
06 | ---- LOCAL SCRIPT ---- |
07 | local plr = game.Players.LocalPlayer; |
08 |
09 | game.ReplicatedStorage.ItemLook.OnClientEvent:connect( function (player_name, name, cash, desc) |
10 | if player_name = = plr.Name then |
11 | print ( "Yes, the player is the correct player." ); |
12 | end |
13 | end ) |
14 | ---- LOCAL SCRIPT ---- |
~~ KingLoneCat