Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Value only passes thru FIreClient as true even when its not?

local replicatestor = game:GetService("ReplicatedStorage")
local kickevent = replicatestor:WaitForChild("KickUser")
local notivalue = false

kickevent.OnServerEvent:Connect(function(player, name)
    for i, v in pairs(game.Players:GetChildren()) do
        if v.Name == name then
--            v:Kick("Kicked")
            wait(.1)
            kickevent:FireClient(player, notivalue == true)
        else
            wait(.1)
            kickevent:FireClient(player, notivalue == false)
        end
    end
end)

first time using remote events, why does the notivalue always remain true when passed thru the other server event

1 answer

When you are firing kickevent to the client, the second argument is comparing notivalue to true or false. Because notivalue is always false, if you compare notivalue to true it will be false and if you compare notivalue to false it will be true.

This discussion is preserved as it was. New answers, comments, and votes are closed.