#Need Help With spawn Part Script??
87 messages · Page 1 of 1 (latest)
can you send me your script
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)```
ok can you say your problem one more time but formatted
cuz I didnt understand the orginal problem you said
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
is this script a local script or a server script
no errors
server script is the white one
local script is the blue one
yeah
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
local model = script.Parent
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"
why do i gotta put the script inside a part
Because model is script.Parent
i want the script to spawn a ppart
the name
bc if you dont want ur script parented to anything, then why do you have a variable defined to script.Parent
so what do i gotta do
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
uh
^
you wrote the code. you should know script.Parent gets the parent of the script
so it needs to be inside the model
about that
so you didnt write the code?
gnomeCode
but they helping me learn
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
well a script help me to script remoteEvents
?
idk
a tutorial helped you learn remove events sure, but do you know how to script it yourself?
there is a difference
maybe
maybe is not a good answer
yes
i dont want u to use gnome code vids to do whatever u want from now on
really is
i am not helping you anymore
i want you to figure this out on ur own
why
** You are now Level 6! **
you didnt write this code
but u helped that russian
problems
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
i script a bit