#Need help fixing an error

1 messages · Page 1 of 1 (latest)

magic ridge
#

Tried making a place system, that checks for models and normal parts, but for some reason. i am getting this error. can someone help me please?

#

Error: ServerScriptService.Main:196: PrimaryPart missing

#

if the client script is needed, lemme know

rotund gull
#

@magic ridge

magic ridge
#

no

rough musk
rotund gull
#

he finna let you wait another half an hour 😭

rough musk
#

so in ReplicatedStorage you have a part you clone and name New_Part

local New_Pos : CFrame = Is_Model and (New_Part.PrimaryPart and New_Part.PrimaryPart.CFrame or error("PrimaryPart missing"))

this line wants a part inside of New_Part called PrimaryPart

#

its okay i know what his issue is

#

and its likely a victim of ai use

#

😭

#

im going to guess inside of his part is nothing

rotund gull
#

i didnt understand this line at all its way to complicated

#

i would pack this up in a if statement to make it more readable

rough musk
#

there is also so much going on

#

my other advice would be have your module script for profile store

#

then have other scripts for whatever functionality

#

if you cram it all into one

#

debug and reading becomes a nightmare

#

@magic ridge

rotund gull
#

exactly i also thought that this script seems kinda long and idk

#

i never needed such complex scripts yet

magic ridge
#

ill prob seperate it

rough musk
#

you should it would be good for you

magic ridge
#

ok i stripped it down

#

i split up the scripts

#

this is the place script:

#

error is on line 94 (still the same)

rough musk
#

And everything in jt

magic ridge
#

ok

magic ridge
#

the models all have primary parts

rotund gull
#

could it be that wehn cloned the primary part is still the one from the replicated storage

#

and thats why you get an error

#

try to update the primaryPart and test it

magic ridge
#

aight

rough musk
# magic ridge aight

If your passing in BasicPart or BigPart as Part_Name

Then searching inside Part_Name for PrimaryPart then that's your issue

magic ridge
rough musk