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: Who here know the answer to this problem?????

Previous Thread :: Next Thread 
MisterScripter is not online. MisterScripter
Joined: 24 Sep 2010
Total Posts: 702
11 Dec 2011 04:32 PM
When I touch the brick, it does not do the disable function. Im trying to disable these scripts, but for some reason does not do anything. I ve checked everything. I also checked and the names were right. Heres the script:
-----------------------------------------------------------------------
function onTouched(hit)
if game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil then
if game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == game.Teams.Reds.TeamColor then
getteams()
else
script.Parent.CanCollide = false
wait(4)
script.Parent.CanCollide = true
end
end
end

function getteams()

h = Instance.new("Message")
h.Parent = game.Workspace
h.Name = "RedAreWiners"

c=game.Players:children()
for i=1, #c do
if c[i].TeamColor==BrickColor.new(21) then
c[i].leaderstats.Money.Value = c[i].leaderstats.Money.Value + 1500
elseif c[i].TeamColor==BrickColor.new(23) then
c[i].leaderstats.Money.Value = c[i].leaderstats.Money.Value + 500
end
h.Text = "MISSION ACCOMPLISHED! REDS GET +1500 MONEY!"
wait(5)
p=game.Workspace:children()
for i=1, #p do
if p[i].Name == "RedAreWinners" then
p[i]:Remove()
disable()
end
end
end
end

function disable()
game.Workspace.GiveWeapons.Disabled = true
game.Workspace.DeathScript.Disabled = false
game.Workspace.BaseSet.Disabled = false
game.Workspace.StartMessage:Remove()
game.Workspace.Starter.Disabled = true
wait(6)
game.Workspace.BaseSet.Disabled = true
game.Workspace.DeathScript.Disabled = true
game.Workspace.TeamTeleport.Disabled = true
game.Workspace.Starter.Disabled = false
end


script.Parent.Touched:connect(onTouched)
Report Abuse
Lowcart is not online. Lowcart
Joined: 12 Sep 2011
Total Posts: 1323
11 Dec 2011 04:33 PM
[ Content Deleted ]
Report Abuse
DXPower is not online. DXPower
Joined: 21 Oct 2008
Total Posts: 2866
11 Dec 2011 04:36 PM
function onTouched(hit)
if (game.Players:GetPlayerFromCharacter(hit.Parent) ~= nil) then
if (game.Players:GetPlayerFromCharacter(hit.Parent).TeamColor == game.Teams.Reds.TeamColor) then
getteams()
else
script.Parent.CanCollide = false
wait(4)
script.Parent.CanCollide = true
end
end
end

function getteams()

h = Instance.new("Message")
h.Parent = game.Workspace
h.Name = "RedAreWiners"

c=game.Players:GetChildren()
for i=1, #c do
if c[i].TeamColor==BrickColor.new(21) then
c[i].leaderstats.Money.Value = c[i].leaderstats.Money.Value + 1500
elseif c[i].TeamColor==BrickColor.new(23) then
c[i].leaderstats.Money.Value = c[i].leaderstats.Money.Value + 500
end
h.Text = "MISSION ACCOMPLISHED! REDS GET +1500 MONEY!"
wait(5)
p=game.Workspace:GetChildren()
for i=1, #p do
if p[i].Name == "RedAreWinners" then
p[i]:Remove()
disable()
end
end
end
end

function disable()
game.Workspace.GiveWeapons.Disabled = true
game.Workspace.DeathScript.Disabled = false
game.Workspace.BaseSet.Disabled = false
game.Workspace.StartMessage:Remove()
game.Workspace.Starter.Disabled = true
wait(6)
game.Workspace.BaseSet.Disabled = true
game.Workspace.DeathScript.Disabled = true
game.Workspace.TeamTeleport.Disabled = true
game.Workspace.Starter.Disabled = false
end


script.Parent.Touched:connect(onTouched)
Report Abuse
MisterScripter is not online. MisterScripter
Joined: 24 Sep 2010
Total Posts: 702
11 Dec 2011 04:45 PM
Thanks Lowcart, Thats what the problem was. I would've never figured it out.
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