Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can i auto-assign a StringValue's Value to a player that joins ?

I am pretty much new in scripting, and i need this to auto-assign a owner (player that joined) to a StringValue's value. I am still learning at the moment and it would really help me if i can get the script so i can understand better. Thank you! :)

1 answer

This is not a request site, so please learn first, and don't ask for scripts, it's a really bad thing and you will not learn from it at all. Plus "still learning" is kind of an excuse, because really this is super simple, any basic scripter would know, using the PlayerAdded event which fires when a player joined, with the paramater containing which player joined, and you can assign that player to the StringValue

local StringValue = --wherever the string value is, it's pathway

game.Players.PlayerAdded:Connect(function(plr) --plr is the player that joined
	StringValue.Value = plr.Name --set it to the player that joined's name
end)

3 comments

0

Ok, thank you ! I am really not good at it and i just started today, i am trying to learn from videos on youtube..

0

Goodluck! Of course I'm not discouraging you or anything!

0

Thank you ! :)

This discussion is preserved as it was. New answers, comments, and votes are closed.