generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Why doesnt this stupid script work...

Previous Thread :: Next Thread 
enes130 is not online. enes130
Joined: 22 Mar 2011
Total Posts: 1403
05 Oct 2012 09:46 AM
ppl ={"enes130", "jasondekiller5"}
game.Players.PlayerAdded:connect(function(playa)
for i=1, #ppl do
if ppl[i] == playa.Name then
return true
end
end
return false
end)
wait()
team1 = Instance.new("Team")
team1.Name = "Owner(s)"
team1.TeamColor = BrickColor.new("Black")
team1.AutoAssignable = false
team1.AutoColorCharacters = false
game.Players.enes130.TeamColor = BrickColor.new("Black")
game.Players.jasondekiller5.TeamColor = BrickColor.new("black")

team2 = Instance.new("Team")
team2.Name = "Players"
team2.TeamColor = BrickColor.new("White")
team2.AutoAssignable = true
team2.AutoColorCharacters = false

teams = Instance.new("Teams")

print("Creating teams")
teams.Parent = game
wait(1)
team1.Parent = teams
team2.Parent = teams
print("Teams created")

thanks = Instance.new("Hint")
thanks.Text = "The owner(s) have entered the server!" --Please don't remove this.
thanks.Parent = game.Workspace
print("Thank-you message created")
end



-enes130
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
05 Oct 2012 09:56 AM
1st
Don't double post
2nd
I said it probably wouldn't work, lol :3

Try this:
ppl ={"enes130", "jasondekiller5"}
playas = {}
game.Players.PlayerAdded:connect(function(playa)
table.insert(playas, playa)
for i=1, #ppl do
if ppl[i] == playa.Name then
playas.playa = true
end
end
end)

I have no idea what I'm doing <3
Report Abuse
enes130 is not online. enes130
Joined: 22 Mar 2011
Total Posts: 1403
05 Oct 2012 09:58 AM
I didnt double post this is another part of script ;p
And I am not the best scripter here so It can be other things to.

-enes130
Report Abuse
enes130 is not online. enes130
Joined: 22 Mar 2011
Total Posts: 1403
05 Oct 2012 10:00 AM
And doesnt work...
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
05 Oct 2012 10:20 AM
Output..?
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
05 Oct 2012 10:22 AM
Never mind. I looked at your script... It's atroshous...
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
05 Oct 2012 10:27 AM
teams = Instance.new("Teams")

Should be

teams = Game:GetService("Teams")
Report Abuse
Desperian is not online. Desperian
Joined: 07 Feb 2012
Total Posts: 3371
05 Oct 2012 10:33 AM
PPL = {
    ["enes130"] = true;
    ["jasondekiller5"] = true;
}

game.Players.PlayerAdded:connect(function(Plyr)
    if PPL[Plyr.Name] and not game.Teams:FindFirstChild("Owner('s)") then
        Team = Instance.new("Team", game:GetService("Teams"))
        Team.Name = "Owner('s)"
        Team.TeamColor = BrickColor.new("Black")
        Team.AutoAssignable = false
        Plyr.TeamColor = Team.TeamColor
        SeTeam = Instance.new("Team", game:GetService("Teams"))
        SeTeam.Name = "Players"
        SeTeam.TeamColor = BrickColor.new("White")
        for _,v in pairs(game.Players:GetPlayers()) do
            if not PPL[v.Name] then
                v.TeamColor = SeTeam.TeamColor
            end
        end
        Hint = Instance.new("Hint", Workspace)
        Hint.Text = "An owner of the game has entered the server!"
        wait(2)
        Hint:Remove()
    elseif PPL[Plyr.Name] and game:GetService("Teams"):FindFirstChild("Owner('s)") then
        Plyr.TeamColor = BrickColor.new("Black")
        Hint = Instance.new("Hint", Workspace)
        Hint.Text = "An owner of the game has entered the server!"
        wait(2)
        Hint:Remove()
    end
end)

Here...
Report Abuse
mamaguy is not online. mamaguy
Joined: 07 Oct 2010
Total Posts: 7073
05 Oct 2012 10:42 AM
@Des
SO MANY PPL R OFF 2DAY
WDF
Report Abuse
enes130 is not online. enes130
Joined: 22 Mar 2011
Total Posts: 1403
05 Oct 2012 04:33 PM
Team part doesnt work...
Report Abuse
leolion113 is not online. leolion113
Joined: 11 Oct 2008
Total Posts: 3336
05 Oct 2012 04:38 PM
It won't if you're testing it in solo... I know it does work, as I tried it earlier when creating it on Desperian.
Report Abuse
blackboy167thst is not online. blackboy167thst
Joined: 22 Jul 2011
Total Posts: 2468
05 Oct 2012 04:40 PM
You didn't parent 'Team1' to Teams.
Report Abuse
enes130 is not online. enes130
Joined: 22 Mar 2011
Total Posts: 1403
05 Oct 2012 04:55 PM
I test it in normal...
Report Abuse
enes130 is not online. enes130
Joined: 22 Mar 2011
Total Posts: 1403
06 Oct 2012 10:54 AM
Bump
Report Abuse
enes130 is not online. enes130
Joined: 22 Mar 2011
Total Posts: 1403
06 Oct 2012 11:15 AM
bump
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image