Hi! Today I was trying to create a system for one of my projects, but I found a problem that I can’t solve, when the Server sends a signal to the script that should execute it sends both the “Fissi” and the “Lampeggianti” can someone help me? Here’s the script,
[DELETED]
A few things:
- When you send from the client to the server the first parameter on the server side is the player who fired, this is by default.
- You have 2 functions connected to the same remote event (both of these are getting the player parameter and not the string you are firing) this is why it acts like its firing twice.
To fix this make one function connected to the event with an if statement
EVL.OnServerEvent:Connect(function(player, value)
if value == "Fissi" then
-- Fissi code
else
-- Lampeggianti code
end
end)
1 Like
Now everything works perfectly fine, thank you!
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.