|
| 06 Jun 2015 08:29 PM |
I cant find the correct angle for a part to face a player i was doing CFrame.Angles(0,24,0) and it was close But i went to 26 then it was all f**ked up! |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 06 Jun 2015 08:30 PM |
| CFrame.new(Part.Position, Player.Position) |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:31 PM |
math.rad() produces an angle
CFrame.Angles(math.rad(90),0,0) |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:32 PM |
| qq no im talking about the angle |
|
|
| Report Abuse |
|
|
| |
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 06 Jun 2015 08:33 PM |
| CFrame.new(Part.Position, Player.Position) [2] |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:33 PM |
| Does NOBODY know that CFrame constructors use radians!? |
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
|
| 06 Jun 2015 08:35 PM |
jarod ur dumb
they obviously use GRADIANS
ahaha bad joke |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:36 PM |
| Any one know how to detect if a key was pressed and if was pressed again it would remove something? |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 06 Jun 2015 08:37 PM |
@Fear, UserInputService/LocalPlayer:GetMouse()
Also y u nu use my CFrame meth0d ;w; |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:38 PM |
Cheese i have it. i mean to detect if a player has press the key again -.-
code -.-
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse()
Mouse.KeyDown:connect(function(Key) if Key == "m" then local p = Instance.new("Part") p.Size = Vector3.new(2,1,2) p.Transparency = 1 p.Parent = Player.Character p.Anchored = true p.CFrame = Player.Character.Torso.CFrame * CFrame.new(0,1,-5) * CFrame.Angles(math.rad(90),math.rad(-90),0) local s = Instance.new("SurfaceGui") s.Parent = p s.CanvasSize = Vector2.new(800,600) s.Face = "Top" local t = Instance.new("TextLabel") t.Parent = s t.Size = UDim2.new(1,0,0,50) t.Text = "Inventory" t.TextScaled = true end end) 00 |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:40 PM |
| Don't Gradians go between 0 and 400 (400 being Tau radians?) |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 06 Jun 2015 08:44 PM |
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() local Toggled = false
Mouse.KeyDown:connect(function(Key) if Key:lower() == 'm' and not Toggled then Toggled = true local p = Instance.new'Part' p.Size = Vector3.new(2,1,2) p.Transparency = 1 p.Parent = Player.Character p.Anchored = true p.CFrame = Player.Character.Torso.CFrame * CFrame.new(0,1,-5) * CFrame.Angles(math.rad(90),math.rad(-90),0) local s = Instance.new'SurfaceGui' s.Parent = p s.CanvasSize = Vector2.new(800,600) s.Face = "Top" local t = Instance.new("TextLabel") t.Parent = s t.Size = UDim2.new(1,0,0,50) t.Text = "Inventory" t.TextScaled = true wait(1) Toggled = false elseif Key:lower() == 'm' and Toggled then print'Destroy' end end) |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 06 Jun 2015 08:44 PM |
o & fearless, u r r()0d m0f0
:> |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:45 PM |
| o mycheese i thought you were someones not mine :D |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 08:47 PM |
| happens if i spam multiple times ^^^ |
|
|
| Report Abuse |
|
|
mycheeze
|
  |
| Joined: 27 Jun 2011 |
| Total Posts: 6748 |
|
|
| 06 Jun 2015 08:54 PM |
local Player = game.Players.LocalPlayer local Mouse = Player:GetMouse() local Toggled = false
Mouse.KeyDown:connect(function(Key) if Key:lower() == 'm' and not Toggled then Toggled = true local p = Instance.new'Part' p.Size = Vector3.new(2,1,2) p.Transparency = 1 p.Parent = Player.Character p.Anchored = true p.CFrame = Player.Character.Torso.CFrame * CFrame.new(0,1,-5) * CFrame.Angles(math.rad(90),math.rad(-90),0) local s = Instance.new'SurfaceGui' s.Parent = p s.CanvasSize = Vector2.new(800,600) s.Face = "Top" local t = Instance.new("TextLabel") t.Parent = s t.Size = UDim2.new(1,0,0,50) t.Text = "Inventory" t.TextScaled = true wait(1) Toggled = false elseif Key:lower() == 'm' and Toggled then print'Destroy' Toggled = false end end) |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 09:03 PM |
| wait(1) Toggled = false at the end i just removed and it works fine thx m8 |
|
|
| Report Abuse |
|
|
|
| 06 Jun 2015 09:06 PM |
| Question How would i make it show like an inventory like as in u have 1 frame then multiple frames in it but the frames are in the same spot but moves down with the item name like in the quarry when u mine a block :D |
|
|
| Report Abuse |
|
|