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

Image failed to load :: Unexpected URL error?

Asked by 10 years ago

So I built a pistol (with help from the wiki) that is basically a laser gun that reloads like a pistol. The only problem with it is when I try to change the mouse icon, it says "Image failed to load :: Unexpected URL" which basically breaks the script. I have no idea why it is doing this as it was working earlier. Script:

01local tool = script.Parent
02local user
03local ammo = 12
05local reloadingIco = 'rbxasset://textures/GunWaitCursor.png'
06--when the tool is equipped
07tool.Equipped:connect(function(mouse)
08    mouse.Icon = fireIco
09   --store the character of the person using the tool
10   user = tool.Parent
11 
12   --when the left mouse button is clicked
13   mouse.Button1Down:connect(function()
14      if ammo ~= 0 then --make and do a hit test along the ray
15       local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit*300)
View all 52 lines...

Any help would be fine.

1 answer

Log in to vote
-1
Answered by 10 years ago

Just use a Image AssetID

0
be more specific. Octillerysnacker 115 — 10y
Ad

Answer this question