#TDS GAME HELP!!!
44 messages · Page 1 of 1 (latest)
its like 7 scripts
but not
ill send it
wait whats the format
to send a script
nm
its kinda big
thats the modual script
and then the client script im sending rn
I think smthn wrong with this one line
function tower.CheckSpawn(player, name, upgradeName)
local towerExists = findModel(name, upgradeName)
if towerExists then
print("towerExists")
print(towerExists)
if player.Gold.Value >= towerExists.Config.PlacementCost.Value then
if player.PlacedTowers.Value < maxTowers then
return true
else
return 2
end
else
return 3
end
end
end
the if player.Gold.Value >= towerExists.COnfig.PlacementCost.Value then
cause thats where its erroring, but it could just be im sending the wrong value, but I checked with printing and debug and its sending the correct value...
ServerScriptService.Main.tower:126: attempt to index nil with 'PlacementCost'
error im getting
no clue why
it seems to error when I click, ima try and fix that area in the client script
I think because of the fact that client cant eddit server and when sending a value, I sent the wrong one?
** You are now Level 3! **
sthu
also if ur still here, thx for trying to help
cause my head hurts rly bad lol
so
basically
COnfig is nil
or Config
@south salmon
can you show findModel()?
thx anyway tho
its only nil when i click
but it sets it to smthn
and the only other way it changes it to nil is AFTER upgrading