|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 24 Jun 2015 07:04 PM |
I feel like I broke Lua RIP
Logic is best |
|
|
| Report Abuse |
|
|
|
| 24 Jun 2015 07:17 PM |
I restarted studio it didn't do anything
Logic is best |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 18 Jul 2013 |
| Total Posts: 4604 |
|
|
| 24 Jun 2015 07:22 PM |
| try that, im just guessing at this point ^^^ |
|
|
| Report Abuse |
|
|
|
| 24 Jun 2015 07:24 PM |
@Dwar nope, still didn't work
Logic is best |
|
|
| Report Abuse |
|
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 24 Jun 2015 07:25 PM |
| Probably because your CFraming is wrong. Fix that |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
| |
|
|
| 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
|
  |
| Joined: 23 Dec 2010 |
| Total Posts: 1350 |
|
|
| 25 Jun 2015 11:49 AM |
| CFrame anchors a part I believe. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 25 Jun 2015 03:50 PM |
Here is my WHOLE script: http://pastebin.com/UYG2nKpK
Logic is best |
|
|
| Report Abuse |
|
|
robotmega
|
  |
| Joined: 16 May 2009 |
| Total Posts: 14084 |
|
| |
|
| |
|
TimeTicks
|
  |
| Joined: 27 Apr 2011 |
| Total Posts: 27115 |
|
|
| 25 Jun 2015 03:58 PM |
| wow this script is actually pretty cool |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|