Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How can I make my Tycoon Drop do this?

So I am making a Tycoon and I am having a problem with my drop. I have a script in the drop that makes it shoot out a brick and I was getting help with that script so it put Decals on both sides of the brick when it is made then shot out. But the problem is when it shoots out the brick it says this " Image failed to load: 51041387: Unexpected URL" and then it just stop shooting out bricks. I tried to put in the full URL, the id, and even the asset id but nothing will work. Please help!! :) GOOD DAY!

The Drop script:

function fire()
	    local p = Instance.new("Part")
	local d = Instance.new("Decal", p)
	    p.Position = script.Parent.Position
	    p.Size = Vector3.new(2, 0.4, 1)
	    p.BrickColor = BrickColor.new(37)
	    p.BottomSurface = 0
	    p.TopSurface = 0
	    p.Name = "TycoonBrick"
	    p.Parent = script.Parent
	d.Texture = "51041387"
	d.Face = "Front"
	local dd = d:clone()
	dd.Face = Back
	end
	 
	 
	while true do
	    wait(2.5)
	    fire()
	end


1 comment

0

Get a decal open, put the number in there and it will change it to an url, copy that and paste it in for the texture. I don't believe you can just have the numbers. I know it auto converts when you put it in, i just don't know if it will do it automaticly through scripting.

1 answer

✓ Accepted answer

Since I didnt have the full script I could only add on to what I saw, and or Improve your scripting

function fire()
        local p = Instance.new("Part")
    local d = Instance.new("Decal", p)
        p.Position = script.Parent.Position
        p.Size = Vector3.new(2, 0.4, 1)
        p.BrickColor = BrickColor.new("Earth green") -- Its Color3.new() for numbers
        p.BottomSurface = 0
        p.TopSurface = 0
        p.Name = "TycoonBrick"
        p.Parent = script.Parent
    d.Texture = "rbxassetid://51041387"
    d.Face = "Front"
    local dd = d:clone()
    dd.Texture = "rbxassetid://51041387" -- Didnt add what you wanted to texture to be
    dd.Face = "Back" -- Forgot to add " "s
    end

    while true do
        wait(2.5)
        fire()
    end


2 comments

0

Thank you !

0

Did it work?

This discussion is preserved as it was. New answers, comments, and votes are closed.