Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Can Somebody Help Me Fix This?

Asked by
ImfaoXD 158
8 years ago

Guys I Need Your Help. I'm Trying To Make An Eyes Blink Script That Works When A Player Pick A Morph.

Can You Guys Help Me Add The Function?

local = lighting.script.Parent

while true do

1 eye1.Transparency = 0 2 eye2.Transparency = 0 3 wait(.15) 4

5 eye1.Transparency = 1 6 eye2.Transparency = 1 7 wait(1.8) end

1 answer

Log in to vote
1
Answered by 8 years ago

First off, capitalization count's in Lua, that mean's if you did parent(which you did) instead of Parent, it won't work. Secondly, you did local ligting.script.parent, You would do local Lighting = script.Parent. Third, you added a un-needed end unless you didn't post some part of your code here like while true do(which you can do while wait() do instead of adding a wait after). Anyway's, here is your script fixed, I won't go into to much detail on the transparency and stuff as it's pretty self explanatory.

local ligting = script.Parent -- Fixed
local eye1 = ligting.eye1 -- From your script, this look's proper
local eye2 = ligting.eye2 -- From your script, this look's proper
eye1.Transparency = 0
eye2.Transparency = 0
wait(10)
eye1.Transparency = 1
eye2.Transparency = 1

Here is a looped version of it, if you want it.

while wait() do -- Loop
    local ligting = script.Parent -- Fixed
    local eye1 = ligting.eye1 -- From your script, this look's proper
    local eye2 = ligting.eye2 -- From your script, this look's proper
    eye1.Transparency = 0
    eye2.Transparency = 0
    wait(10)
    eye1.Transparency = 1
    eye2.Transparency = 1
end -- End the loop
Ad

Answer this question