I tried to make a script to check if the input is a valid child, but it doesn't find the child, here is the script
local funct = game.ReplicatedStorage:WaitForChild("Gamepass2")
-- this part works
if game.ServerStorage.Events:FindFirstChild("Tornado") then
print("why?")
end
-- this one is broken for some reason
funct.OnServerInvoke = function(plr, check)
print(check)
if check == game.ServerStorage.Events:FindFirstChild(check) then
print("yes")
else
print("no")
end
end
I use the remote function, so I can return a value to the player.
