dav2777
(dav2777)
December 29, 2022, 3:33pm
#1
Im currently making a customer food ordering system. Basically, what i mean is, a proximity prompt is triggered from an npc,
When the Proximity Prompt is triggered, a script in ServerScriptService will Trigger a remote event in Replicated Storage.
When the remote event will be triggered, a cash register in workspace will receive the triggered event (a script in the cash register)
When the remote event is received, the script will randomly choose a button on the cash register and will make it become neon. (after that im not done doing the script, but thats isnt important)
So, my problem is the following, when the proximity prompt is triggered, a remote event is fired. but i dont know what to type in the parenthesis ()
So far, i’ve tried typing different things in the parenthesis , but they end up has errors.
if you know a solution to this problem is please tell me. If needed i could provide more screenshots.
Thank You
I’m confused, why are you doing Player:FindFirstChild("anything")
in the first place (“anything” is just a placeholder). The first parameter you pass into FireClient
is the Player
itself. So you should be doing
game.ReplicatedStorage.CustomerOrder1:FireClient(Player)
You used this line? If so, run this right before that line:
print(Player, typeof(Player))
oops, add another parenthesis after typeof(Player)
it should be:
print(Player, typeof(Player))
My bad.
1 Like
add an extra bracket to close it, print(Player, typeof(Player))
1 Like
dav2777
(dav2777)
December 29, 2022, 3:43pm
#9
no problem, ok ill try it
ill tell if works
domboss37
(TSL)
December 29, 2022, 3:46pm
#12
Well I just noticed the error is caused because you ran
game.ReplicatedStorage.CustomerOrder1:FireClient(Player:FindFirstChild(Player))
You should run this:
1 Like
Don’t type that, type the other one where you fired your client remote
1 Like
You could do :FireAllClient() if youre doing all players
1 Like
dav2777
(dav2777)
December 29, 2022, 3:50pm
#16
its just for the player who triggered it not, not all the players
domboss37
(TSL)
December 29, 2022, 3:51pm
#17
Did you try the script with the line I gave you?
domboss37
(TSL)
December 29, 2022, 3:51pm
#19
You still ran it with the FindFirstChild
. Please run the following:
Only the above quote, don’t add the find first child
Youre doing the same thing over and over again, you need to read what people give you
1 Like
dav2777
(dav2777)
December 29, 2022, 3:53pm
#21
so if i understood, i run this:
game.ReplicatedStorage.CustomerOrder1:FireClient(Player)
domboss37
(TSL)
December 29, 2022, 3:54pm
#22
Yes, only that in place of your current line.
2 Likes
dav2777
(dav2777)
December 29, 2022, 3:57pm
#23
Thank You, it worked and im not getting any errors. But the only thing is that the OnClient script isnt doing anything