of     1   

roxasbubbles
#138943162Wednesday, July 02, 2014 3:46 AM GMT

I made a brick that if you step on it, the NumberValue would go up by 1, but it's not working. I put the NumberValue and this script as a child on the brick: function onTouched(part) script.parent.value.value = script.parent.value.value + 1 end
roxasbubbles
#138944300Wednesday, July 02, 2014 3:59 AM GMT

Please help me D:
Vuva
#138944997Wednesday, July 02, 2014 4:07 AM GMT

You just made a function called onTouched and you never gave it anything to connect to so it could run. You need to connect it to an event. function onTouched(part) script.parent.value.value = script.parent.value.value + 1 end script.Parent.Touched:connect(onTouched) Also, you don't need to name it "onTouched". As long as the function names match then it will know what function to trigger when it is ".Touched"
Club24Hour
#138945122Wednesday, July 02, 2014 4:09 AM GMT

Change the name of the value holder, and you have to have a capital for Value. script.Parent.CHANGENAME.Value = script.Parent.CHANGENAME.Value + 1 end
Club24Hour
#138945176Wednesday, July 02, 2014 4:10 AM GMT

O. I didnt even notice that lel. But what I mentioned could have been an error...
roxasbubbles
#138945811Wednesday, July 02, 2014 4:17 AM GMT

Okay thanks! I'll try what you guys suggested.
TheBoyOnTheBlock
#138946189Wednesday, July 02, 2014 4:22 AM GMT

function onTouched(part) part.value.Value = part.value.Value + 1 end script.Parent.Touched:connect() onTouched(script.Parent) end)
roxasbubbles
#138946890Wednesday, July 02, 2014 4:31 AM GMT

Got it to work, yay! ^_^ Thanks so much! function onTouched(hit) game.Workspace.Map1Button.Value.Value = game.Workspace.Map1Button.Value.Value + 1 end game.Workspace.Map1Button.Touched:connect(onTouched)

    of     1