#Tower Defense Game, need help

73 messages · Page 1 of 1 (latest)

plain kernel
#

edit: here is my module script inside the script

copper turtle
#

try Mob.Spawn

#

roblox is case sensitive sometimes

plain kernel
#

where abouts, if u can help

copper turtle
#

oh wait

plain kernel
#

still doesn't work, srry

copper turtle
#

modulescript name is Mob right?

plain kernel
#

just changed it

#

doesnt work sadly :c

plain kernel
copper turtle
#

take ss of the path

plain kernel
#

okay, i fixed it slightly

#

the error is no longer showing

#

now the warning is showing

#

but i MIGHT be able to fix

#

im gonna remake the zombie and put it in replicatedstorage

turbid forgeBOT
#

studio** You are now Level 1! **studio

plain kernel
#

ok

#

still didnt work

#

NEW PROBLEM:
I have a zombie in workspace, where do i put it so the scripts mentioned above recognise it?

#

okay im just making this worse

#

so

steep light
plain kernel
#

okay, 1 second tho

#

gotta sort out the other problems i've created

#

okay, heres the problem

#

Script 1: Normal script

#

Script 2: Module script

#

module script is in normal script, which is in serverscriptstorage

#

error is this:
ServerScriptService.Main:4: attempt to index nil with 'Spawn' - Server - Main:4

#

do u know how to fix this

narrow lark
#

you define mob in a script that doesnt call it

#

so itll be nil

plain kernel
#

uhh

#

how do i fix that (srry, im new to script)

narrow lark
#

also im not sure what you mean by .spawn

#

do you mean spawn()

plain kernel
#

oh

narrow lark
#

or task.spawn()

plain kernel
#

wait sorry im getting rlly confused

#

for the defining mob stuff, i realised that local zombie is meant to be local mob

narrow lark
#

you need to use require to get stuff from a modulescript

plain kernel
#

okay

#

i fixed the error, and the only thing im getting is the warning

#

in the module script

narrow lark
#

also

#

your scripting inside a modulescript as if its a serverscript

plain kernel
#

im rlly sorry im new

narrow lark
#

for some reason

plain kernel
#

blame the guy doing this 22 video guide

#

im just following it

narrow lark
#

if your this new you shouldnt be doing spawning mechanics

plain kernel
#

"gnomecode"

turbid forgeBOT
#

studio** You are now Level 2! **studio

plain kernel
#

alr sorry for wasting your time

narrow lark
#

.spawn isnt a property of anything im pretty sure

#

also you can do this all in one script

plain kernel
#

oh cool

#

i didnt realise

#

tbh maybe i should put this on hold until im better

narrow lark
#
local zombie = --blah blah
local map = workspace.Jungle

local function mobSpawn(name, map)
  blah blah
end

mobSpawn(zombie, map)
#

also you put the zombie paramater as a string when its a variable

plain kernel
#

wait i got like 34 questions rn

#

1: whats a parameter
2: whats a string
3: ik what a variable is but rn im like REALLY confused rn like aaaaaaaa

#

im just gonna copy that script into the module script..

narrow lark
#

you should probably learn scripting first

plain kernel
#

how should i do that? is there like a game for it

narrow lark
plain kernel
#

thanks

#

sorry for taking your time, atleast u tried

#

nothing can save me tbh