This simple thing is boggling my mind.
So when I print “FilteredMessage”, it prints “/rainmoney”. When I print(filteredMessage == “/rainmoney”) it’s false. Anyone know why it’s not equivalent?
local filteredMessage = game:GetService("Chat"):FilterStringForBroadcast(message, player)
print(isOwner(sender))
print(filteredMessage)
print(filteredMessage == "/rainmoney")
print((tostring(filteredMessage) == "/rainmoney"))
print(isOwner(sender) and (tostring(filteredMessage) == "/rainmoney" or filteredMessage == "it's raining money!"))
Output:
22:57:57.243 true - Server - ADMIN:3076
22:57:57.243 /rainmoney - Server - ADMIN:3077
22:57:57.244 false - Server - ADMIN:3078
22:57:57.244 false - Server - ADMIN:3079
22:57:57.244 false - Server - ADMIN:3080