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

Help with Model Transparency Command Script?

Asked by
iSvenDerp 233 Moderation Voter
9 years ago

Hi..(Thanks for any help in advance) I am making a command script for my group and i already have most of the commands done but this one isnt working. when i say open this model with 4 parts becomes Visible. I already tried it with a part and it worked but i transferred the script to the model and now its not working. Output shows nothing but I think whats messing up something is when I call the model. I dont think its the chatted part or the admin part because it worked when it was a part and like ive said ive already made other commands. Here it is...

01local Admins = {"iSvenDerp"}
02P = script.Parent:GetChildren("Part","Part","Part","Part")
03 
04 
05function checkAuthority(name)
06    for a,v in pairs(Admins) do
07        if v == name then
08            return true
09        end
10    end
11    return false
12end
13 
14 
15 
View all 37 lines...
0
Why on line 2 do you define the 4 "Part"? :GetChildren() doesnt require anything but a location to get the children from. BinaryResolved 215 — 9y
0
I get what your saying but i also had a script in there so i could till do it and it wouldnt hurt anything right? iSvenDerp 233 — 9y

2 answers

Log in to vote
1
Answered by
ImageLabel 1541 Moderation Voter
9 years ago

Your blocks aren't anchored, which explains why they fall down, and are eventually destroyed. You wouldn't see the process because you're setting the transparency property of the parts to 1.

Ad
Log in to vote
2
Answered by 9 years ago

There's two things wrong. First, your table P. With :GetChildren() it doesn't need any arguments meaning you should replace script.Parent:GetChildren("Part","Part","Part","Part") with script.Parent:GetChildren()

Second, it looks like you're trying to make the table transparent and Non-Collidable, not the actual parts. One way of fixing this would be to replace

1P.CanCollide = true
2P.Transparency = 0

with

1for i, v in pairs (P) do--Loops through the children of `script.Parent`
2    if v:IsA("BasePart") then--Makes sure that the object is a part
3        v.CanCollide=true
4        v.Transparency=0
5    end
6end

And do the same with

1P.CanCollide = false
2P.Transparency = 1
0
Hi..Thanks for helping and i think your right but it still doesnt work i got an error 09:45:39.187 - Workspace.Chamber.Script:28: unexpected symbol near ')' iSvenDerp 233 — 9y
0
he forgot an end. HungryJaffer 1246 — 9y
0
Derp sorry xD Prohibetur 70 — 9y
0
? so could u show me where? :3 i am just a poor little boy iSvenDerp 233 — 9y
View all comments (7 more)
0
On line 2 you checked if v is a basepart and never ended it. HungryJaffer 1246 — 9y
0
I know what I did ... also iSvenDerp replace just add an end after v.Transparency=0 Prohibetur 70 — 9y
0
I can't test it right I should he able to in a few hours iSvenDerp 233 — 9y
0
Still doesnt work:( 16:07:14.491 - Workspace.Chamber.Script:28: unexpected symbol near ')' iSvenDerp 233 — 9y
0
pairs( to next, ? since 'i' is not being used.. Nickoakz 231 — 9y
0
Sorry about that ... again ... If you copy and paste again it should work Prohibetur 70 — 9y
0
Thanks for the help iSvenDerp 233 — 9y

Answer this question