so I been working on how to make owner has joined the server script I look it up and I made lots of mistake and dont know how to fix it can I get some advise are a script should use
Have you already made a script? If so, please post it so we can help you better.
Clearify, what’s the mistake of the script?
game.Players.PlayerAdded:connect(function(plr) if plr.UserId == youridhere then -- do stuff with owner end end)```
You can also do game.CreatorId instead of youridhere.
So I try to put my name and it never worked.
Not too sure what you are actually trying to, please be more specific. I assume you are trying to make a script that shows a message whenever an owner joins, but I do not fully understand what you are trying to do or what the error is exactly.
Were do I put the Id if I ask.
Yes indeed that’s what i’m trying to make.
Where is says youridhere, replace it with your UserId and then do whatever you want below.
if plr.UserId == 1603726202 then
– do stuff with owner
PS: Added your ID for you.
Thank U I will test it make sure it all good.
Wanna drop that in a code box to make it a little neater
if plr.UserId == 1603726202 then – do stuff with owner end end)```
I would recommend indenting to make your code more readable for yourself and others.
game.Players.PlayerAdded:Connect(function(plr) if plr.UserId == 1603726202 then -- do stuff with owner end end)
Hello, tysm everyone for helping me and everything this is now closed have a good day,
Generic that can be used in any game.
game.Players.PlayerAdded:Connect(function(player) if game.CreatorType == Enum.CreatorType.User then -- So no errors (checking if its a player obj) if player.UserId == game.CreatorId then -- Now that the owner has joined, stuff goes below! end end)
Use CreatorId like @IntelligentCappy advised.
stick one of these codes as a solution so no one replies