#Need Help With spawn Part Script??

87 messages · Page 1 of 1 (latest)

tough bolt
#

wow

still willow
#

can you send me your script

tough bolt
#
local model = script.Parent
local prompt = model.Prompt.ProximityPrompt

local MapSpawn = game.Workspace.MapSpawn 

prompt.Triggered:Connect(function(player)
    local oldCharacter = player.Character
    local morphModel = model:FindFirstChildOfClass("Model")

    if morphModel then
        local newCharacter = morphModel:Clone()

        newCharacter.HumanoidRootPart.Anchored = false

        
        local spawnPosition = MapSpawn.Position
        newCharacter:SetPrimaryPartCFrame(CFrame.new(spawnPosition))

        player.Character = newCharacter
        newCharacter.Parent = workspace
    else
        warn("Morph model not found.")
    end
end)```
still willow
#

ok can you say your problem one more time but formatted

#

cuz I didnt understand the orginal problem you said

tough bolt
#

so

#

when i have a local script

#

in startercharacter

#

with the part spawining script

#

it works

#

but if i morph

#

into a character

#

it does not spawn

#

even if i put the script inside of the model

still willow
#

is this script a local script or a server script

tough bolt
#

no errors

still willow
#

server script is the white one
local script is the blue one

tough bolt
#

yeah

still willow
#

local scripts cannot be used in workspace

#

only server scripts can be used in workspace

#

so change the code over to a server script(the white script)

#

and then put it inside the part

tough bolt
#

wait

#

why do i gotta put it in a part

tough bolt
#

i dont get what you are talking about

#

"local scripts cannot be used in workspace
only server scripts can be used in workspace
so change the code over to a server script(the white script)
and then put it inside the part"

still willow
#

yes

#

uhh let me explain better

tough bolt
#

why do i gotta put the script inside a part

still willow
#

Because model is script.Parent

tough bolt
#

i want the script to spawn a ppart

still willow
#

what is model then

#

wait what is the model can you tell me

tough bolt
#

the name

still willow
#

bc if you dont want ur script parented to anything, then why do you have a variable defined to script.Parent

still willow
#

model is the instance

tough bolt
#

so what do i gotta do

still willow
#

as of right now, i dont understand what the first 2 lines of code are even meant for, bc u dont want the new script parented to anything

tough bolt
#

uh

still willow
#

you wrote the code. you should know script.Parent gets the parent of the script

#

so it needs to be inside the model

still willow
#

so you didnt write the code?

tough bolt
#

gnomeCode

still willow
#

listen

#

these tutorials are wasting your time

#

I have been there

tough bolt
#

but they helping me learn

still willow
#

they make you feel like ur learning but ur rlly not dude

#

you may be learning a bit, but not to the fullest extent you can

#

i have been in the same situation as u

#

i wasted a whole year of my life watching yt tutorial vids to help me script everything

#

dont waste your time doing that

#

it gets you nowhere

#

Bc at the end of the day, you did not make it and you copied it from someone else

tough bolt
#

well a script help me to script remoteEvents

still willow
#

?

tough bolt
#

idk

still willow
#

a tutorial helped you learn remove events sure, but do you know how to script it yourself?

#

there is a difference

still willow
#

maybe is not a good answer

tough bolt
#

yes

still willow
#

i dont want u to use gnome code vids to do whatever u want from now on

tough bolt
#

so u said

#

put a part

#

inside

#

of the model

still willow
#

dev forum is a great place

tough bolt
#

really is

still willow
#

i want you to figure this out on ur own

tough bolt
#

why

median skyBOT
#

studio** You are now Level 6! **studio

still willow
#

you didnt write this code

tough bolt
#

but u helped that russian

still willow
#

i am not gonna help you make smhtn u didnt make work

#

cuz he made his code

tough bolt
#

problems

still willow
#

i helped u till i realised you just straight copied from gnome code

#

and didnt understand the first 2 lines of code

#

in the script

tough bolt
#

i script a bit