#Need help on calling the proper names

64 messages · Page 1 of 1 (latest)

frank halo
#
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```
#

local objectClone = Objects.Essence:Clone()

I need someone to verify if this one really called the object

vivid pond
#

print objectClone

#

and if it prints the name and clicking it you can go to the clone, is alright

frank halo
#

how?

vivid pond
#

but if it prints nil it doesnt clone

frank halo
#

wait

#

how do I call it though?

vivid pond
#

just do print(objectClone)

#

below the clone

frank halo
#

wait it was not global

vivid pond
#

wdym

#

calling it

frank halo
#

the correct directories

#

also

vivid pond
#

do you mean calling the local of the clone?

frank halo
#

this is on a part

frank halo
#

Reference the part

vivid pond
#

yes, the part clone?

frank halo
#

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

vivid pond
#

yeah, it spawns in the floor or smth?

frank halo
#

above the object

#

it's a local script though

vivid pond
#

If u can send a photo and i can have more reference gonna be better

frank halo
#

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

vivid pond
#

ok wait ill see in a moment

#

alright and it spawns above no?

frank halo
#

it doesn't even print the while loop

dire plume
#

where is your script

frank halo
#

it's nested below a part

dire plume
#

where is it located in game

frank halo
#

workspace

frank halo
dire plume
#

local scripts only run in StarterPlayerScripts and in player characters

#

they don't run in workspace

dire plume
frank halo
#

alright ima swap it in server

frank halo
dire plume
#

they work if they are parented under Player or Player.Character

ornate gardenBOT
#

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

dire plume
#

so PlayerGui, Backpack, PlayerScripts

#

any of this locations

#

and in character

frank halo
#

as long as it's in players

#

I'll remember that

dire plume
#

also you use Position to move objects

#

don't do that

#

use CFrame instead

#

it's much better

frank halo
#

can tou show it to me how?

dire plume
#

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

frank halo
#

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