#Nothing happens when say /spooky

1 messages · Page 1 of 1 (latest)

fallen warren
#

I scripted that when player with that name says /spooky clones a model in replicated storage clone in workspace but nothing really happens

woeful coral
#

scripts?

fallen warren
woeful coral
#

wait

fallen warren
#

k

woeful coral
#

uhh

torpid gyro
fallen warren
#

yes

woeful coral
#

it makes the model at the location 0,0,0

fallen warren
#

and so?

woeful coral
#

are you checking there

#

also i dont think messaging service works if you do it on the same server

#

if im not wrong

fallen warren
#

ofc it works

woeful coral
#

wait

fallen warren
#

waiting

torpid gyro
woeful coral
#

any errors

torpid gyro
#

Do you know if the function is even called at all?

grand lantern
#

does spooky have a primarypart

fallen warren
#

yes

fallen warren
#

thats why im confused

woeful coral
#

did you check in output?

fallen warren
woeful coral
#

or console -> server

torpid gyro
grand lantern
#

do you see spooky in workspace after the function was called?

#

like in the explorer

fallen warren
grand lantern
#

wtf

torpid gyro
woeful coral
#

WAIT

#

is the place saved and published

fallen warren
#

i nscript i called it

fallen warren
woeful coral
#

is this a server script?

#

oh

fallen warren
#

and yes

#

SSS too

woeful coral
#

...

#

is this ragebait

torpid gyro
fallen warren
#

what line

fallen warren
torpid gyro
#

after when parent is set

fallen warren
#

and nothing happens

torpid gyro
fallen warren
#

yes

#

nothing

#

like nothing rly happens

torpid gyro
#

Most likely because the function never got fired

grand lantern
#

Is the connection to to the function there? Try putting a print at the top of the function

torpid gyro
#

there's a problem not with the function but with the MessagingService part

hollow templeBOT
#

studio** You are now Level 9! **studio

fallen warren
#

finally my scripter online im ask him

#

to see

grand lantern
#

put it in a pcall or sum

#

local success, err = pcall(function()
MessagingService:SubscribeAsync(EVENT_NAME, function(message)
if message.Data == "spawn" then
spawnSpooky()
end
end)
end)

if not success then
warn("unreal", err)
end

torpid gyro
fallen warren
#

but where

torpid gyro
#

You can test from studio

torpid gyro
fallen warren
#

nope

mystic meteor
#

is this fixed?

#

i may help if i can

fallen warren
near granite
#

did yall see the fancy scroll discord added

#

nvm im just delusional

minor hearth
# fallen warren

issue 1:
-# this might be my idiotness showing
you publish "spawn" to the messaging service, but you listen to EVENT_NAME

issue 2:
-# performance related
instead of checking when a player chats every time, first check if they're an admin and then start listening to the .chatted event

issue 3:
spookyModel might not be a model; check for that

recommandations:

  • re-read the documents for MessagingService
  • add prints everywhere
woeful coral
minor hearth
#

arg

#

sorry

#

i never used that service

#

buut why do you input it

#

if it's not useful

woeful coral
#

idk

minor hearth
#

right

#

if it works, it works

#

lmao

#

wait no

woeful coral
#

hmm

#

maybe users are capitalized wrong?

tired willow
#

@minor hearth we are guy gardener 2000

minor hearth
#

how did you find this

minor hearth
#

good luck

fallen warren
#

if not working ima do admin panel

#

lol

minor hearth
#

💔

pearl ocean
#

the subscribe probably doesn't fire on the same server a message was published

#

or it may just be studio

#

the docs will probably say, or you can just test that

fallen warren
#

FINALLY IT WORKS

pearl ocean