Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 31 Aug 2011 03:23 PM |
screen1 and screen2 have already beed defined Current positions: (-43, 55.6, 52.5) and (10.5, 55.6, 20.5) respectively isAdmin function has already been defined (is defined the right word?) When I say "Lower Board Room Blinds", the screens both change their transparency and canCollide properties, but they don't move at all.
game.Players.PlayerAdded:connect(function(p) if isAdmin(p.Name) then p.Chatted:connect(function(msg) if msg=="Lower Board Room Blinds" then screen1.Transparency=0 screen2.Transparency=0 screen1.CanCollide=true screen2.CanCollide=true screen1 = CFrame.new(-43, 45.6, 52.5) screen2 = CFrame.new(10.5, 45.6, 20.5) elseif msg=="Raise Board Room Blinds" then screen1 = CFrame.new(-43, 55.6, 52.5) screen2 = CFrame.new(10.5, 55.6, 20.5) screen1.Transparency=1 screen2.Transparency=1 screen1.CanCollide=false screen2.CanCollide=false end end) end end) |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 03:25 PM |
| is screen1 or screen2 a vairiable? |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 31 Aug 2011 03:26 PM |
Yes, they have already been defined. And I know they work, because the first part works, just not the cFrame |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 03:28 PM |
| Try screen1.Cframe = CFrame.new(WhateverPosition) |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 03:29 PM |
| screen1.CFrame = CFrame.new(WhateverPosition) -- fixed a small typo. |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 31 Aug 2011 03:29 PM |
| Just try THAT, in the command bar (im assuming)? |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 31 Aug 2011 03:29 PM |
Oh wait that wouldnt work lolfail What do you want me to try? |
|
|
| Report Abuse |
|
|
|
| 31 Aug 2011 03:30 PM |
well, in the script. to Edit the CFrame of a part you have to do EX: game.Workspace.Part.CFrame = CFrame.new(0,0,0) |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 31 Aug 2011 03:31 PM |
| Okay, lemme see how that goes |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 31 Aug 2011 03:33 PM |
| Tried directly specifying teh object instead of using the variable. No difference. |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 31 Aug 2011 03:48 PM |
| Ugh why doesn't cFrame liek me? |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
| |
|
| |
|
|
| 01 Sep 2011 09:21 AM |
--Ltrpls
game.Players.PlayerAdded:connect(function(p) if isAdmin(p.Name) then p.Chatted:connect(function(msg) if msg=="Lower Board Room Blinds" then screen1.Transparency=0 screen2.Transparency=0 screen1.CanCollide=true screen2.CanCollide=true screen1.CFrame = CFrame.new(-43, 45.6, 52.5) screen2.CFrame = CFrame.new(10.5, 45.6, 20.5) elseif msg=="Raise Board Room Blinds" then screen1.CFrame = CFrame.new(-43, 55.6, 52.5) screen2.CFrame = CFrame.new(10.5, 55.6, 20.5) screen1.Transparency=1 screen2.Transparency=1 screen1.CanCollide=false screen2.CanCollide=false end end) end end) |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 01 Sep 2011 12:28 PM |
| Erm...what did you even change? |
|
|
| Report Abuse |
|
|
| |
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 01 Sep 2011 12:41 PM |
To clarify, isAdmin is already a function earlier on in the script. If you want, here it is.
function isAdmin(name) for i,v in pairs(admins) do if name:lower() == v:lower() then return true end end return false end |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 01 Sep 2011 12:47 PM |
I think I've come to the conclusion that, yes, cFrame hates me. Unless someone else can come up with a reasonable explanation. |
|
|
| Report Abuse |
|
|
|
| 01 Sep 2011 12:48 PM |
| MasterOfDeathOnes showed solution to your problem, but you seem not to have acknowledged his help. |
|
|
| Report Abuse |
|
|
Colt324
|
  |
| Joined: 19 Aug 2009 |
| Total Posts: 1562 |
|
|
| 01 Sep 2011 12:51 PM |
Oh, sorry about that. I didn't seem to see his changes. He could ahve pointed out what he changed. I had to save them as seperate files and then do a Compare in Word to find out teh differences. Thanks. That should fix it, I'll try. |
|
|
| Report Abuse |
|
|