|
| 25 Mar 2017 09:12 PM |
uhh the tower isnt spawning?
function onClicked(p) local val = p:WaitForChild("SelectedItem") if val.Value == "Test" then if script.Parent.IsUsed == false then local tower = game.ReplicatedStorage.Towers.Tower local st = tower:Clone() st.Parent = workspace st:MoveTo(script.Parent.Position + Vector3.new(0,3,0)) wait() script.Parent.IsUsed.Value = true end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 09:14 PM |
st.Parent = game.Workspace
are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 09:17 PM |
| 22:16:50.259 - ###################################### attempt to index global 'moveHandles' (a nil value) ############ - Stack Begin 22:16:50.260 - Script #################################### Line 199 22:16:50.260 - Stack End whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 09:19 PM |
try posting again this time, copy it first, preview, look at what got filtered, and repost with x's before all filtered terms
are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 09:24 PM |
| 22:16:50.259 - Plugin_604x7x9x6x0x8x5.Terrain_Generate:xx1xx99: attempt to index global 'moveHandles' (a nil value) 2x2:x1x6:x50.x26x0 - Stack Begin 2x2:x1xx6:x50.260 - Script 'Plugin_6x0x47xxxx96x0xx85.Txexrrxaixn_Gexnxerxxaxte', Line ##### ################## - Stack End whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 09:24 PM |
lets just say it literally has nothing to do with my script and that was the only error
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
LuluPls
|
  |
| Joined: 23 Aug 2010 |
| Total Posts: 1221 |
|
|
| 25 Mar 2017 09:33 PM |
that means "moveHandles" doesn't exist.
|
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 09:44 PM |
but it doesnt relate to my script at all
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
KenUSM
|
  |
| Joined: 21 Nov 2015 |
| Total Posts: 146 |
|
|
| 25 Mar 2017 09:48 PM |
It's most likely the
script.Parent.ClickDetector.MouseClick:connect(onClicked)
if no errors show. |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 10:07 PM |
local click = Instance.new("ClickDetector",script.Parent)
click.MouseClick:connect(function(p) local val = p:WaitForChild("SelectedItem") if val.Value == "Test" then if script.Parent.IsUsed == false then local tower = game.ReplicatedStorage.Towers.Tower local st = tower:Clone() st.Parent = game.Workspace st:MoveTo(script.Parent.Position + Vector3.new(0,3,0)) wait() script.Parent.IsUsed.Value = true end end end
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 10:10 PM |
23:07:24.451 - Workspace.SelectTile.Script:16: ')' expected (to close '(' at line 3) near 'eof'
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
Ben1925
|
  |
| Joined: 07 Apr 2011 |
| Total Posts: 741 |
|
|
| 25 Mar 2017 10:10 PM |
| Print statements everywhere, see where the script is flowing. |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 10:12 PM |
| ^ do that after every 'argument', put print("1"), then ########### ### #### ### you can see what numbers it prints and find out where it stopped are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 10:13 PM |
I am going to strangle whoever decided these filters were smart.
^ do that after first arg: print("1") second : print("2")
etc etc that way you can determine exactly where it went wrong
are you not ENTERTAINED!??! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 10:15 PM |
function onClicked(p) print("Clicked") local val = p:WaitForChild("SelectedItem") if val.Value == "Test" then print("is test") wait() if script.Parent.IsUsed == false then local tower = game.ReplicatedStorage.Towers.Tower wait() local st = tower:Clone() print("cloing tower") wait() st.Parent = game.Workspace print("parent is workspace") wait() st:MoveTo(script.Parent.Position + Vector3.new(0,3,0)) print("moved") wait() script.Parent.IsUsed.Value = true print("value is true") end end end script.Parent.ClickDetector.MouseClick:connect(onClicked)
stopped at "Clicked"
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
KenUSM
|
  |
| Joined: 21 Nov 2015 |
| Total Posts: 146 |
|
|
| 25 Mar 2017 10:51 PM |
script.Parent.ClickDetector.MouseClick:connect(function() -- add rest of the script here end
or replace MouseClick with MouseButton1Click:connect(onClicked)
If it's not a GUI and make sure you inserted the ClickDetector
or do Instance.new() -- you should know the rest. |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 11:10 PM |
stops at "is test"
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
|
| 25 Mar 2017 11:11 PM |
fixed it
whats gonna work, teamwork! |
|
|
| Report Abuse |
|
|
|
| 26 Mar 2017 12:26 AM |
if script.Parent.IsUsed == false then
If that's a BoolValue you're indexing, you need to say IsUsed.Value == false then.
|
|
|
| Report Abuse |
|
|