Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why is the function not connecting?

Asked by 10 years ago

Can someone please tell me why this function is not connecting? I get no errors in output and no message in output either. I have to have the game.Players.PlayerAdded for something i'm going to do with it later but i've narrowed it down to function thats not working. Thanks!

game.Players.PlayerAdded:connect(function(player)
    function Intermission()
        print("Your in the Intermission Function")
    end

game.Players.PlayerAdded:connect(Intermission)  

end)

1 answer

Log in to vote
1
Answered by 10 years ago

You've mixed it up. Use these tactics.

Make the function standalone.

function Intermission()
    print("Your in the Intermission Function")
end
game.Players.PlayerAdded:connect(Intermission)  

Use a function without needing a name.

game.Players.PlayerAdded:connect(function()
    print("Your in the Intermission Function")
end)  
1
Why are you using quotes.........? NotsoPenguin 705 — 10y
0
The quotes look as okay ways to do these titles, but subheadings would probably be better (## instead of >) BlueTaslem 18071 — 10y
Ad

Answer this question