function test(var)
print(var)
end
test("hello")
will print "hello"
How do I pass a value into an event e.g.
function test(p,var)
print(var)
end
game.Players.PlayerAdded:Connect(test("hello"))
returns error
21:17:26.792 - Attempt to connect failed: Passed value is not a function
21:17:26.793 - Stack Begin
21:17:26.793 - Script 'Workspace.Script', Line 5
21:17:26.794 - Stack End
21:17:26.794 - attempt to call a nil value
Is it possible to pass values when calling a function like with the first example but with an event?
Thank you in advance to anyone that helps. If anything is unclear just leave a comment and I will try to explain.

1 comment
game.Players.PlayerAdded:Connect(function() end (Line 5) While you did game.Players.PlayerAdded(test("hello"))