local Replicated = game:GetService("ReplicatedStorage")
local Objects = Replicated.Buildings.EssenceParts
local collector = script.Parent
local BuildingPos = collector.Position
local function appearEssence()
local objectClone = Objects.Essence:Clone()
objectClone.Parent = workspace
objectClone.Position = BuildingPos + Vector3.new(0, 5, 0) -- Set the position above the basePart
local SetCFrame = objectClone.CFrame
local Response = Replicated.Buildings.EssenceParts['Spawn']:InvokeServer(objectClone.Name, SetCFrame)
print("SPAWNED ESSENCE")
end
while true do
wait(5)
appearEssence()
print("spawning")
end```
#Need help on calling the proper names
64 messages · Page 1 of 1 (latest)
local objectClone = Objects.Essence:Clone()
I need someone to verify if this one really called the object
print objectClone
and if it prints the name and clicking it you can go to the clone, is alright
how?
but if it prints nil it doesnt clone
wait it was not global
do you mean calling the local of the clone?
this is on a part
if it did really call or reference, sorry I used the wrong term
Reference the part
yes, the part clone?
basically the concept is that there is this part/object that I have and I want it to spawn another part above it
that is the objectClone, the part that I want to spawn
yeah, it spawns in the floor or smth?
If u can send a photo and i can have more reference gonna be better
do I need to make it server?
the block is the main part and the blue orb is the thing that I want to spawn
I also sent the picture of the replicated storage
it doesn't even print the while loop
where is your script
here
it's nested below a part
where is it located in game
workspace
the part that I am refering is the block here
local scripts only run in StarterPlayerScripts and in player characters
they don't run in workspace
also they run in guis
alright ima swap it in server
don't they work in tools and stuff?
they work if they are parented under Player or Player.Character
alright thanks
** You are now Level 6! **
also you use Position to move objects
don't do that
use CFrame instead
it's much better
can tou show it to me how?
I'm on phone rn
basically if you multiply a cframe by other cframe, first one gets offset by the second one
you should do some tests and see how objects move yourself to understand how that works
alright thanks
Im still a beginner so I'll try testing more stuff and learn how they works
18:11:55.899 Essence is not a valid member of Folder "ReplicatedStorage.Buildings.EssenceParts" - Server - Script:13
it's referening to this local Objects = Replicated.Buildings.EssenceParts