|
| 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
|
  |
| 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 |
|
|
|
| 02 Jan 2014 01:37 PM |
| sorry but nothing happened |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 02 Jan 2014 01:57 PM |
| what do you mean i have to loop? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 23 Jan 2010 |
| Total Posts: 21869 |
|
|
| 02 Jan 2014 05:25 PM |
| What do you want to happen involving this "InfoRemover"? |
|
|
| Report Abuse |
|
|
|
| 02 Jan 2014 07:07 PM |
| I actualy got this script on the toolbox, so i dont know what this inforeamover does |
|
|
| Report Abuse |
|
|