Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Ore does not move after being created?

Asked by 7 years ago
Edited 7 years ago

Sorry if this is a stupid question, but I just don't know why the ore isn't moving. If I use the move tool in play solo and move the ore after it drops, it moves but it just doesn't 'drop' after it gets created without having me to use the move tool.

Here's a screenshot

And the script:

while wait(1) do
            if not script.Parent:FindFirstChild("HitBox") then
                if workspace.OreHold ~= nil then
                    local p = Instance.new("Part", workspace.OreHold)
                    p.Name = 'Ore'
                    p.Size = Vector3.new(1,1,1)
                    p.TopSurface = "Smooth"
                    p.BottomSurface = "Smooth"
                    local v = Instance.new("NumberValue", p)
                    v.Name = "Value"
                    v.Value = 1
                    p.CanCollide = true
                    p.Anchored = false
                    p.CFrame = script.Parent.DropPart.CFrame - Vector3.new(0,1,0)
                else
                    local o = Instance.new("Folder", workspace)
                    o.Name = "OreHold"
                end
            end
end

1 answer

Log in to vote
0
Answered by 7 years ago

I'm not sure what's wrong there, but here's another way of doing it. Just make the ore with whatever you need in it, put it where you want it to spawn, and put it in ServerStorage. Then add this script.

while wait(1) do
            if not script.Parent:FindFirstChild("HitBox") then
                if workspace.OreHold ~= nil then
                    local p = game.ServerStorage.Ore
                    p.Parent = game.Workspace.OreHold
                else
                    local o = Instance.new("Folder", workspace)
                    o.Name = "OreHold"
                end
            end
end
0
already figured it out before your ansver, i just had to vait a bit before cframing it Operation_Meme 890 — 7y
Ad

Answer this question