generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: cFrame hates me, or am I just stupid?

Previous Thread :: Next Thread 
Colt324 is not online. 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
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
31 Aug 2011 03:25 PM
is screen1 or screen2 a vairiable?
Report Abuse
Colt324 is not online. 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
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
31 Aug 2011 03:28 PM
Try screen1.Cframe = CFrame.new(WhateverPosition)
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
31 Aug 2011 03:29 PM
screen1.CFrame = CFrame.new(WhateverPosition) -- fixed a small typo.
Report Abuse
Colt324 is not online. 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 is not online. 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
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
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 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
31 Aug 2011 03:31 PM
Okay, lemme see how that goes
Report Abuse
Colt324 is not online. 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 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
31 Aug 2011 03:38 PM
Bump?
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
31 Aug 2011 03:42 PM
BAWMP
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
31 Aug 2011 03:48 PM
Ugh why doesn't cFrame liek me?
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
31 Aug 2011 04:12 PM
I want cFrame to liek me!
Report Abuse
Colt324 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
01 Sep 2011 09:02 AM
any1 care to help me?
Report Abuse
greedyawesomeman is not online. greedyawesomeman
Joined: 18 Apr 2010
Total Posts: 1038
01 Sep 2011 09:06 AM
Would if I could.
Report Abuse
MasterOfDeathOnes is not online. MasterOfDeathOnes
Joined: 21 Mar 2009
Total Posts: 6975
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 is not online. Colt324
Joined: 19 Aug 2009
Total Posts: 1562
01 Sep 2011 12:28 PM
Erm...what did you even change?
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
01 Sep 2011 12:36 PM
[ Content Deleted ]
Report Abuse
Colt324 is not online. 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 is not online. 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
crazypotato4 is not online. crazypotato4
Joined: 22 Feb 2010
Total Posts: 20000
01 Sep 2011 12:48 PM
MasterOfDeathOnes showed solution to your problem, but you seem not to have acknowledged his help.
Report Abuse
Colt324 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image