yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 06 Feb 2014 08:01 PM |
if script.Parent.Text == "Part" then Instance.new("Part", Workspace) end |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Feb 2014 08:11 PM |
| what is the script's parent |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 06 Feb 2014 08:14 PM |
| if this is the entire script then when the game loads it checks and it it won't load again |
|
|
| Report Abuse |
|
|
|
| 06 Feb 2014 08:14 PM |
function c() if script.Parent.Text == "Part" then Instance.new("Part", Workspace) end
script.Parent.Changed:connect(c)
--would work if youre changing the text later on and it doesnt start of with the text "Part" |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Feb 2014 08:15 PM |
| You want to create a part every time it changes to Part? |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 06 Feb 2014 08:17 PM |
@extreme
the last line is wrong |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Feb 2014 08:18 PM |
This is probably the best way so it doesn't spam parts, only creates it one you click enter.
local self = script.Parent local function lostFocus(e) if e and self.Text == "Part" then Instance.new("Part", workspace) end end self.FocusLost:connect(lostFocus) |
|
|
| Report Abuse |
|
|
| |
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 06 Feb 2014 08:21 PM |
| when you stop typing in a textbox by pressing enter or clicking outside of it. if you pressed enter, it's argument (enterPressed) is true |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 06 Feb 2014 08:24 PM |
@cnt
Thank you!!!!!!!!! But can you help me get the part to spawn on my head? |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 06 Feb 2014 08:25 PM |
local self = script.Parent local function lostFocus(e) if e and self.Text == "Part" then Instance.new("Part", workspace).Position = game.Players.LocalPlayer.Character.Head.Position + Vector3.new(0,1.1,0) end end self.FocusLost:connect(lostFocus) |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Feb 2014 08:26 PM |
local part = Instance.new("Part") part.Anchored = true --I'm assuming you want it anchored part.Position = script.Parent.Parent.Parent.Character.Head.Position + Vector3.new(0, script.Parent.Parent.Parent.Character.Head.Size.Y/2, 0) part.Parent = workspace |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 06 Feb 2014 08:27 PM |
| Thanks!!! But is Vector3.new finished?? :P |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
|
| 06 Feb 2014 08:28 PM |
Thank you so much and i have one more question. Where do i put;
local part = Instance.new("Part") part.Anchored = true --I'm assuming you want it anchored part.Position = script.Parent.Parent.Parent.Character.Head.Position + Vector3.new(0, script.Parent.Parent.Parent.Character.Head.Size.Y/2, 0) part.Parent = workspace
--where toi paste this? |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Feb 2014 08:28 PM |
| lolb, I'm assuming he is using a server-side script in a button under a gui in playergui. since this new FilteringEnabled thing might screw with this, I'm not sure of the details of it |
|
|
| Report Abuse |
|
|
yankeejr
|
  |
| Joined: 04 Jul 2012 |
| Total Posts: 4906 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Feb 2014 08:31 PM |
| same place you did the Instance.new("Part", workspace), just remove that line and paste it there |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 06 Feb 2014 08:33 PM |
| No, re-read what I said... "FilteringEnabled" |
|
|
| Report Abuse |
|
|