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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Help please and fast!

Previous Thread :: Next Thread 
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
02 Jan 2014 01:06 PM
while (script:findFirstChild("InfoRemover") == nil) do wait(0.1) end

local g = Instance.new("ScreenGui")
g.Name = "InfoBox"

local t = Instance.new("TextLabel")
t.Name = "Info"
t.Text = "You are being morphed my Dragon's morpher! Loading..."
t.BackgroundTransparency = 0
t.BackgroundColor3 = Color3.new(0, 0, 0)
t.BorderSizePixel = 0
t.TextColor3 = Color3.new(1, 1, 1)
t.Position = UDim2.new(0, 0, 0.95, 0)
t.Size = UDim2.new(1, 0, 0.05, 0)
t.Parent = g

local CanMorph = nil
local Lock = nil

local s = script.InfoRemover:Clone()
s.Parent = g
s.Disabled = false

script.Parent.BrickColor = BrickColor.new("Bright yellow")

function onTouch(hit)
local HP = game.Players:GetPlayerFromCharacter (hit.Parent)
if (Lock == nil) then
if HP.TeamColor == "Really black" then
Lock = true
script.Parent.BrickColor = BrickColor.new("Medium stone grey")

CanMorph = nil
BodyParts = hit.Parent:GetChildren()
for i,b in pairs(BodyParts) do
if (b.className == "Humanoid") then
CanMorph = true
end
wait(0.1)
end
if (CanMorph == nil) then
script.Parent.BrickColor = BrickColor.new("Bright yellow")
Lock = nil
return
end

Problem:

function onTouch(hit)
local HP = game.Players:GetPlayerFromCharacter (hit.Parent)
if (Lock == nil) then
if HP.TeamColor == "Really black" then
Lock = true
script.Parent.BrickColor = BrickColor.new("Medium stone grey")

What i want to do is that if the person that touches the button and this person is on team Really black, it morphs himself, but if hes on a other team, it wont morph him
Report Abuse
4567777 is not online. 4567777
Joined: 13 Jul 2013
Total Posts: 128
02 Jan 2014 01:10 PM
if HP.TeamColor == BrickColor.new("Really black") then

try that
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
02 Jan 2014 01:37 PM
sorry but nothing happened
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Jan 2014 01:40 PM
"while (script:findFirstChild("InfoRemover") == nil) do wait(0.1) end"

this takes up all the thing - nothing else will happen - you have looop!
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
02 Jan 2014 01:57 PM
what do you mean i have to loop?
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Jan 2014 02:06 PM
Try this:

repeat wait(.1) until script:findFirstChild("InfoRemover")

local g = Instance.new("ScreenGui")
g.Name = "InfoBox"

local t = Instance.new("TextLabel")
t.Name = "Info"
t.Text = "You are being morphed my Dragon's morpher! Loading..."
t.BackgroundTransparency = 0
t.BackgroundColor3 = Color3.new(0, 0, 0)
t.BorderSizePixel = 0
t.TextColor3 = Color3.new(1, 1, 1)
t.Position = UDim2.new(0, 0, 0.95, 0)
t.Size = UDim2.new(1, 0, 0.05, 0)
t.Parent = g

local CanMorph = nil
local Lock = nil

local s = script.InfoRemover:Clone()
s.Parent = g
s.Disabled = false

script.Parent.BrickColor = BrickColor.new("Bright yellow")

function onTouch(hit)
local HP = game.Players:GetPlayerFromCharacter (hit.Parent)
if (Lock == nil) then
if HP.TeamColor == "Really black" then
Lock = true
script.Parent.BrickColor = BrickColor.new("Medium stone grey")

CanMorph = nil
BodyParts = hit.Parent:GetChildren()
for i,b in pairs(BodyParts) do
if (b.className == "Humanoid") then
CanMorph = true
end
wait(0.1)
end
if (CanMorph == nil) then
script.Parent.BrickColor = BrickColor.new("Bright yellow")
Lock = nil
return
end

Problem:

function onTouch(hit)
local HP = game.Players:GetPlayerFromCharacter (hit.Parent)
if (Lock == nil) then
if HP.TeamColor == "Really black" then
Lock = true
script.Parent.BrickColor = BrickColor.new("Medium stone grey")
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
02 Jan 2014 02:20 PM
Didnt worked, i fixed the spots that were red on the script, but when i tested it nothing happened, nothing showed on the output window.
I replaced the first line of the original script with the first line that you placed on this script, but still nothing happened, and nothing appeared on the output window. Thanks for trying to help me!
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 Jan 2014 05:25 PM
What do you want to happen involving this "InfoRemover"?
Report Abuse
DragonOfWar900 is not online. DragonOfWar900
Joined: 11 May 2011
Total Posts: 1508
02 Jan 2014 07:07 PM
I actualy got this script on the toolbox, so i dont know what this inforeamover does
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