in one script i have
_G.valcoin = 0
script.Parent.Text = _G.valcoin
and in another i have
function onTouched(hit) _G.valcoin += 1 end script.Parent.Touched:connect(onTouched)
but it does not seem to add any number to valcoin? please help.
First of all, you should provide code in the Code block, apart from not making function local (recommended) and using :Connect
instead of deprecated :connect
your problem may be that one script is normal and another one is local (because you set the text of some instance in it) and they don't share same global valuables. Please provide more information on kinds of scripts, errors and put the scripts in the Code block.