|
| 10 Jan 2016 07:54 PM |
for i = 20,0,-1 do status.Value = "Round in progress " .. i wait(1) end local finishbutton = newmap:WaitForChild("FinishButton") finishbutton.Touched:connect(function(hit) newmap:Destroy() status.Value = hit.Parent.Name .. "has won the game" end)
the output doesnt say anything. What I want to happen is for the status to say who wins and to delete the map. NOTHING HAPPENS! Please Help! |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 10 Jan 2016 07:56 PM |
| Does the Round in progress bit work? |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 08:02 PM |
| I'm sorry I didnt mention this... and yes it does work the touched part doesnt work. |
|
|
| Report Abuse |
|
|
| |
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 10 Jan 2016 08:19 PM |
| Move the touched part to above the loop. Including the local finishbutton line |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 08:19 PM |
Are you sure finishedbutton is a valid member of newmap?
"local finishbutton = newmap:WaitForChild("FinishButton")"
#Code print("Song Link: http://www.roblox.com/Deorro-vs-Swedish-House-Mafia-Save-The-5-Hours-item?id=340827217") |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 09:04 PM |
Ban - I tried this yet it still doesn't work.
Advanced - yes i'm sure. |
|
|
| Report Abuse |
|
|
| |
|
| |
|
|
| 10 Jan 2016 09:44 PM |
| B3 PLEASEEEEEEEE!!!!!!!!!!!!!!!!!!!!!!!! |
|
|
| Report Abuse |
|
|
|
| 10 Jan 2016 09:46 PM |
| What is the value of status? |
|
|
| Report Abuse |
|
|
Ryuzoji
|
  |
| Joined: 21 Dec 2015 |
| Total Posts: 937 |
|
|
| 10 Jan 2016 09:47 PM |
"Move the touched part to above the loop. Including the local finishbutton line"
It should work. |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2016 03:31 PM |
| well... I guess I'm screwed |
|
|
| Report Abuse |
|
|
|
| 11 Jan 2016 04:54 PM |
put a print at the very top if it does not work then
make it not in a localscript be sure it's not disabled then put the script in workspace or in something inside of workspace because scripts don't run in a lot of the other places
after that change the script to
local finishbutton = newmap:WaitForChild("FinishButton")
finishbutton.Touched:connect(function(hit) newmap:Destroy() status.Value = hit.Parent.Name .. "has won the game" end)
for i = 20,0,-1 do status.Value = "Round in progress " .. i wait(1) end
if any errors happen in workspace show me them
|
|
|
| Report Abuse |
|
|
|
| 12 Jan 2016 10:08 PM |
| the output doesnt say anything and nothing is happening... |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 01:46 PM |
| DOES ANYONE HAVE ANY OTHER SUGGESTIONS!? |
|
|
| Report Abuse |
|
|
Casualist
|
  |
| Joined: 26 Jun 2014 |
| Total Posts: 4443 |
|
|
| 13 Jan 2016 01:53 PM |
| Posting more relevant code might help. All things equal, the issue seems not to be with the connection but with your definition of newmap and the finishbutton (by extension), but we lack insight into how you define newmap |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 02:24 PM |
| the other stuff is named correc tly because other things using the map were working. |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 02:33 PM |
do you even stop the "for" loop when the finishbutton was touched really please confirm this |
|
|
| Report Abuse |
|
|
BanTech
|
  |
| Joined: 31 Dec 2015 |
| Total Posts: 886 |
|
|
| 13 Jan 2016 02:37 PM |
| The loop stops before the event is connected, the indentation is misleading :P |
|
|
| Report Abuse |
|
|
|
| 13 Jan 2016 07:45 PM |
| So how can I change the script so when the finishbutton is touched the for loop stops and the newmap is destroyed? |
|
|
| Report Abuse |
|
|
| |
|
| |
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 13 Jan 2016 09:28 PM |
What is new map, have u said what it is yet?
What is status like srsly where are u getting these?
local lobbyseconds = 20 while lobbyseconds>0 do status.Value = "Round Ending in "..lobbyseconds.." seconds" wait(1) lobbyseconds = lobbyseconds - 1 end
local finishbutton = newmap:WaitForChild("FinishButton")
finishbutton.Touched:connect(function(hit) newmap:Destroy() status.Value = hit.Parent.Name .. "has won the game" end)
--hit.Parent.Name? why this (just get the player hitting it, specifically) |
|
|
| Report Abuse |
|
|
Link5659
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4525 |
|
|
| 13 Jan 2016 09:30 PM |
Also;
finishbutton.Touched:connect(function(hit) lobbyseconds = 0 newmap:Destroy() status.Value = hit.Parent.Name .. "has won the game" end) |
|
|
| Report Abuse |
|
|