|
| 24 Jan 2016 11:02 PM |
[title], but obviously it's not working. Nothing is happening when I test it and I get no errors.
--[[ variables ]]-- local bg = script.Parent local border = bg.border local tech = bg.techno local studio = bg.studio local player = game.Players.LocalPlayer
local phase = 1 local piece1, pos1 = bg.pulsePiece1, UDim2.new(0.005, 0, 0.01, 0) local piece2, pos2 = bg.pulsePiece2, UDim2.new(0.005, 0, 0.9, 0) local piece3, pos3 = bg.pulsePiece3, UDim2.new(0.945, 0, 0.9, 0) local piece4, pos4 = bg.pulsePiece4, UDim2.new(0.945, 0, 0.01, 0)
--[[ functions ]]-- function editColor(piece) while true do if phase == 1 then for i = 1, 85 do piece.BackgroundColor3 = piece.BackgroundColor3 + Color3.new(i/85, 0, -(i/85)) wait() end phase = 2 elseif phase == 2 then for i = 1, 85 do piece.BackgroundColor3 = piece.BackgroundColor3 + Color3.new(-(i/85), i/85, 0) wait() end phase = 3 elseif phase == 3 then for i = 1, 85 do piece.BackgroundColor3 = piece.BackgroundColor3 + Color3.new(0, -(i/85), i/85) wait() end phase = 1 end wait() end end
function rotatePiece(piece) for i = 1, 90 do piece.Rotation = piece.Rotation + i wait() end end
function playIntroAnimation() for i,v in pairs(getfenv()) do if string.sub(i, 1, 5) == "piece" then spawn(editColor(v)) spawn(rotatePiece(v)) end end end
player.CharacterAdded:connect(function() wait() playIntroAnimation() end)
~ Sincerely, Duncan ~ |
|
|
| Report Abuse |
|
|
| 24 Jan 2016 11:12 PM |
It looks good to me. (I'm not that an expert in coding) Although the tech looks new to me (I'm new at scripting.. mind me. xD)
Maybe it's a spelling error? A upper case should not be there? Look for any errors you may have made.
I'm just trying to help. xP |
|
|
| Report Abuse |
|
|
| 24 Jan 2016 11:56 PM |
@punky There wasn't any spelling errors because there wasn't an error on the output.
~ Sincerely, Duncan ~ |
|
|
| Report Abuse |
|
|
| 25 Jan 2016 06:02 PM |
Found the problem using a few tests; getfenv() doesn't work on local variables.
~ Sincerely, Duncan ~ |
|
|
| Report Abuse |
|