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

Server sided script that executes if a player i listed joins the game?

I do have a few serversided scripts like an older version of Flamingos/Decaboxes Ultimate trolling gui and I want a script that executes the requied Ultimate trolling gui script if a friend joins or me.

2 comments

2

This is a helping website not a requesting website.

0

what is this for - exploits?

2 answers

✓ Accepted answer

You might use something like this

Players.PlayerAdded:Connect(function(player)
	if player.Name == "" then--put you or your friends name
		--do something
	end
end)

You could also use something like this

local mytable = {"you", "friend1","friend2"}
local Players = game.Players
Players.PlayerAdded:Connect(function(player)
	for i, v in pairs(mytable) do
		if player.Name == mytable[i] then
			--do something
		end
	end
end)

I'm fairly new to scripting so forgive me if I'm wrong.

3 comments

0

It didnt work. Its a required script which is only executeable by the developer console or a script that can execute required ones. (I will give an example it wont work so dont try it, require(564377564).load(Your Username) If i enter it in a normal script roblox studio doesnt want to load it.

0

Why won't it load in roblox studio? did you put it in a script inside ServerScriptService? I tried both methods showed before I published my response and they worked just fine. If you did put it serverscriptservice, and it still doesn't work. You should go find someone who is good at scripting, unlike me

0

This guys script is right you must be messing something up

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