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 » Scripters
Home Search
 

Re: Unanchored Brick stays suspended in air...??

Previous Thread :: Next Thread 
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
24 Jun 2015 06:57 PM
lolwut
ok, so I made a script that creates a brick that drops behind you acting as a "Flare" in my game. But for some reason it is unanchored and it decides to stay up in the air. I checked the properties of the brick and it was even unanchored in its properties. I messed around with it without any luck. How could I make the brick NOT float in the air like it is some flying saucer. Here is my code:




local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
while not plr.Character do
wait()
end
local char = plr.Character

mouse.Button2Down:connect(function()
local p = Instance.new("Part", game.Workspace)
p.BrickColor = BrickColor.new("Black")
p.Size = Vector3.new(1,1,1)
p.CFrame = CFrame.new(char.Torso.Position + Vector3.new(0,10,0)) - char.Torso.CFrame.lookVector * 5
local ll = Instance.new("PointLight", p)
ll.Brightness = 6
ll.Range = 15
ll.Color = Color3.new(255,0,0)
local s = Instance.new("Sparkles", p)
s.SparkleColor = Color3.new(255,0,0)
p.Anchored = false
p.BottomSurface = "Smooth"
p.TopSurface = "Smooth"
end)


Thanks!!



Logic is best
Report Abuse
fiterpilot is not online. fiterpilot
Joined: 31 Mar 2012
Total Posts: 135
24 Jun 2015 07:00 PM
Maybe restart your studio? Or test it in a server instead of solo? There is no reason this should be happening, judging by your script.
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
24 Jun 2015 07:02 PM
http://www.roblox.com/games/261500822/FOXmcloud021s-Place-Number-367

Right-Click in the game
It still floats
wat



Logic is best
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
24 Jun 2015 07:04 PM
I feel like I broke Lua
RIP



Logic is best
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
24 Jun 2015 07:17 PM
I restarted studio
it didn't do anything



Logic is best
Report Abuse
Dwarlon is not online. Dwarlon
Joined: 18 Jul 2013
Total Posts: 4604
24 Jun 2015 07:22 PM
local plr = game.Players.LocalPlayer
local mouse = plr:GetMouse()
while not plr.Character do
wait()
end
local char = plr.Character

mouse.Button2Down:connect(function()
local p = Instance.new("Part", game.Workspace)
p.BrickColor = BrickColor.new("Black")
p.Size = Vector3.new(1,1,1)
p.Anchored = false
p.CFrame = CFrame.new(char.Torso.Position + Vector3.new(0,10,0)) - char.Torso.CFrame.lookVector * 5
local ll = Instance.new("PointLight", p)
ll.Brightness = 6
ll.Range = 15
ll.Color = Color3.new(255,0,0)
local s = Instance.new("Sparkles", p)
s.SparkleColor = Color3.new(255,0,0)
p.BottomSurface = "Smooth"
p.TopSurface = "Smooth"
end)
Report Abuse
Dwarlon is not online. Dwarlon
Joined: 18 Jul 2013
Total Posts: 4604
24 Jun 2015 07:22 PM
try that, im just guessing at this point ^^^
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
24 Jun 2015 07:24 PM
@Dwar
nope, still didn't work



Logic is best
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
24 Jun 2015 07:25 PM
Probably because your CFraming is wrong. Fix that
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
24 Jun 2015 07:27 PM
@TimeTicks

1) You could tell me what is wrong about it rather than telling me to fix it

2) How does CFraming have to do with it being anchored?



Logic is best
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
24 Jun 2015 08:16 PM
what do?



Logic is best
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
25 Jun 2015 11:06 AM
Bump


Logic is best
Report Abuse
FearlessBiscuit is not online. FearlessBiscuit
Joined: 16 Jun 2013
Total Posts: 1157
25 Jun 2015 11:37 AM
p.CFrame = CFrame.new(char.Torso.CFrame + Vector3.new(0,10,0)) - char.Torso.CFrame.lookVector * 5 -- not Position :)
Report Abuse
Stefan631 is not online. Stefan631
Joined: 23 Dec 2010
Total Posts: 1350
25 Jun 2015 11:49 AM
CFrame anchors a part I believe.
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
25 Jun 2015 03:48 PM
@Fearless
If you use .CFrame rather than .Position, it will error because .Position returns a Vector3 value, as CFrame returns multiple Vector3 values for position, rotation, etc.



Logic is best
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
25 Jun 2015 03:50 PM
Here is my WHOLE script:
http://pastebin.com/UYG2nKpK



Logic is best
Report Abuse
robotmega is not online. robotmega
Joined: 16 May 2009
Total Posts: 14084
25 Jun 2015 03:54 PM
p:breakJoints()
Report Abuse
NovusTheory is not online. NovusTheory
Joined: 14 Oct 2009
Total Posts: 4532
25 Jun 2015 03:56 PM
#Logic
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
25 Jun 2015 03:58 PM
wow this script is actually pretty cool
Report Abuse
FOXmcloud021 is not online. FOXmcloud021
Joined: 14 Apr 2012
Total Posts: 3512
25 Jun 2015 04:18 PM
@TimeTicks
It works best with a spooky map,
game.Lighting.TimeOfDay = 0
game.Lighting.Brightness = 0
game.Lighting.GlobalShadows = false

@robotmega
thank you
thank you so much




Logic is best
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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