|
| 15 Aug 2012 08:43 AM |
I am struggling to find out what this problem is. I've searched it over multiple times but can not fine what is wrong. Output says it is fine but it definitively is not. The script operates, just not correctly.
local Person = {"MastaJames", "africansoldier"} local children1 = script.Parent.Glass:GetChildren() function onChatted(msg, recipient, speaker) if string.lower(msg) == "open" then for i = 1, #Person do if speaker.Name == Person[i] then for i = 1, #children1 do if children1[i]:IsA("Part") or children[i]:IsA("WedgePart") then for u = 0.5, 1, 0.01 do children1[i].Transparency = u wait(0.1) end children1[i].CanCollide = false end end end end end end function onPlayerEntered(newPlayer) newPlayer.Chatted:connect(function(msg, recipient) onChatted(msg, recipient, newPlayer) end) end game.Players.ChildAdded:connect(onPlayerEntered)
When I run this script, the not all of the children in the model Glass disappear. Some go off and some don't. I made sure I had the correct part types and everything. I just don't know what I did wrong...
Please try your best to help me! |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2012 09:00 AM |
| I have discovered when testing it that the parts I am trying to change the transparency of are changing on at a time for some reason that is over my head. I have no idea what is going on here. Anybody know what could be going on here? |
|
|
| Report Abuse |
|
|
| |
|
|
| 15 Aug 2012 02:21 PM |
if children1[i]:IsA("Part") or children[i]:IsA("WedgePart") then
-- You mispelt children1 after the OR
if children1[i]:IsA("Part") or children1[i]:IsA("WedgePart") then |
|
|
| Report Abuse |
|
|
|
| 15 Aug 2012 03:21 PM |
I fixed the misspelling, but I still have the same problem. The bricks are not loading correctly. It loads one brick at a time instead of all at once. The problem lies somewhere in here. If you need to, refer to my first post to see the whole script.
for i = 1, #children1 do if children1[i]:IsA("Part") or children[i]:IsA("WedgePart") then for u = 0.5, 1, 0.01 do children1[i].Transparency = u wait(0.1)
There is sufficient amounts of ends and children1 is equal to script.Parent.Glass:GetChildren(). Glass is the model I want to get the it's bricks to change transparency.
Any idea what is going on here? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 16 Aug 2012 10:02 AM |
| Just remove the wait(0.1). |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 10:08 AM |
@Mr, You don't understand, he's trying to make fading type of glass... |
|
|
| Report Abuse |
|
|
|
| 16 Aug 2012 10:24 AM |
| The glass is going to slowly disappear, yes. The problem with this script is that for some reason It only does one brick at a time. I have yet to find out why this does this. That's why I need your help. |
|
|
| Report Abuse |
|
|
| |
|
general75
|
  |
| Joined: 25 Sep 2008 |
| Total Posts: 21 |
|
|
| 16 Aug 2012 12:44 PM |
On Line 4 -if string.lower(msg) == "open" then- needs to be if(string.lower(msg1,4)"open") then |
|
|
| Report Abuse |
|
|
mamaguy
|
  |
| Joined: 07 Oct 2010 |
| Total Posts: 7073 |
|
|
| 16 Aug 2012 12:51 PM |
@General, Or if string.sub(msg, 1) == "open" then |
|
|
| Report Abuse |
|
|