|
| 03 Jul 2014 09:28 PM |
local tool = script.Parent local user tool.Equipped:connect(function(mouse) user = tool.Parent
mouse.Button1Down:connect(function() local ray = Ray.new(tool.ring.CFrame.p, (mouse.Hit.p - tool.ring.CFrame.p).unit*300) local hit, position = game.Workspace:FindPartOnRay(ray, user)
local f = hit and hit.Parent and hit.Parent:FindFirstChild("Fish") if f then end local distance = (position - tool.ring.CFrame.p).magnitude local rayPart = Instance.new("Part", user) rayPart.Name = "RayPart" rayPart.BrickColor = BrickColor.new("Really Black") rayPart.Transparency = 0 rayPart.Anchored = true rayPart.CanCollide = true rayPart.TopSurface = Enum.SurfaceType.Smooth rayPart.BottomSurface = Enum.SurfaceType.Smooth rayPart.formFactor = Enum.FormFactor.Custom rayPart.Size = Vector3.new(0.2, 0.2, distance) rayPart.CFrame = CFrame.new(position, tool.ring.CFrame.p) * CFrame.new(0, 0, -distance/2) rayPart.BrickColor = BrickColor.new("Really Black") m = Instance.new("Message") wait(3) m.Parent = game.Workspace m.Text = math.random("You caught a fish", "You caught a shark", "You caught a Blueguy195!") end) end)
The script above is when the tool is equipped and it is clicked, a part is made where the mouse clicked. Problems are: Message doesn't work The color is always white The tool is turned to the right by 2 studs. |
|
|
| Report Abuse |
|
| |
| |
| |
| |
| |