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

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

Asked by 4 years ago

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
This is a helping website not a requesting website. Trading_Opportunity 191 — 4y
0
what is this for - exploits? 0msh 333 — 4y

2 answers

Log in to vote
0
Answered by 4 years ago
Edited 4 years ago

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.

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. cankanxxxx -4 — 4y
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 jediplocoon 877 — 4y
0
This guys script is right you must be messing something up retracee 68 — 4y
Ad
Log in to vote
0
Answered by 4 years ago

I did a huge mistake with the placement.

Answer this question