Image failed to load :: Unexpected URL error?
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:
01 | local tool = script.Parent |
07 | tool.Equipped:connect( function (mouse) |
13 | mouse.Button 1 Down:connect( function () |
15 | local ray = Ray.new(tool.Handle.CFrame.p, (mouse.Hit.p - tool.Handle.CFrame.p).unit* 300 ) |
16 | local hit, position = game.Workspace:FindPartOnRay(ray, user) |
19 | local humanoid = hit and hit.Parent and hit.Parent:FindFirstChild( "Humanoid" ) |
21 | if hit.Namee = = "Head" then |
22 | humanoid:TakeDamage( 10000000 ) |
24 | humanoid:TakeDamage( 30 ) |
28 | local distance = (position - tool.Handle.CFrame.p).magnitude |
29 | local rayPart = Instance.new( "Part" , user) |
30 | rayPart.Name = "RayPart" |
31 | rayPart.BrickColor = BrickColor.Yellow() |
32 | rayPart.Transparency = 0.5 |
33 | rayPart.Anchored = true |
34 | rayPart.CanCollide = false |
35 | rayPart.TopSurface = Enum.SurfaceType.Smooth |
36 | rayPart.BottomSurface = Enum.SurfaceType.Smooth |
37 | rayPart.formFactor = Enum.FormFactor.Custom |
38 | rayPart.Size = Vector 3. new( 0.2 , 0.2 , distance) |
39 | rayPart.CFrame = CFrame.new(position, tool.Handle.CFrame.p) * CFrame.new( 0 , 0 , -distance/ 2 ) |
42 | game.Debris:AddItem(rayPart, 0.1 ) |
46 | print ( "Insert reloading sounds here" ) |
Any help would be fine.