Its hard to explain what im doing, but in short im trying to send a bool value through and event.
when i try to send the value (typed from a text box) it wont work.
the reciving script would check if a bool is true or false and then do something according to that
although for some reason its not workin all the the sudden.
(please tell me what script you want to see, because there are 2)
For some reason, instances don’t pass through events, even if they are in a place accessible by both the client and the server. You should instead pass something it can be identified by, such as it’s name, or just it’s value.
also you. might be sending a string through (if its typed from a textbox) and not even a bool. without seeing any scripts that is probably what the issue is
i mean right off the top of my head you could use an if statement (if “true” then return true else return false end) but there is probably a more efficient way
if ItemName.Text == "Announce" then
Handler:FireServer("Announce", param1.Text, param2.Text)
end
(this is jsut a snippet, AKA the important one. “param 2.text” is the bool)
recive:
local Handler = game.ReplicatedStorage.AdminPanelRequest
local notif = game.ReplicatedStorage.CMDErrorSender
local players = game:GetService("Players")
Handler.OnServerEvent:Connect(function(plr, Kind, param1, param2)
if Kind == "Announce" then
for _, player in pairs(players:GetPlayers()) do
notif:FireClient(player, param1, param2)
end
end
end)
(this just goes on to fire to the actual thing that recives the bool. other scripts that send the bool to this event work fine, so idk why this one wont work.)
cool - on another note, there is probably a better way to handle your sevent firing. i think you can fire all clients from the client, although i could be wrong. i do not believe there is a reason to send anything to the server. got to go, good luck