generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

I need help fixing a script output function

Previous Thread :: Next Thread 
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 10:24 PM
I've been working on a tool that is a spirit bomb it seems functional but the thing that is not working properly is the function that creates the mouse click to activate.
If you can help me fix this function here is the lines to the output.

enabled = true
Thing = Character.Occupied

function onButton1Down(mouse)
if not enabled then
return
end

local player = game.Players.LocalPlayer
if player == nil then return end
enabled = false
mouse.Icon = "http://www.roblox.com/asset/?id=41672909"

local pos = mouse.Hit.p

---------------------------------------------------------------------------------
mouse.Icon = "http://www.roblox.com/asset/?id=11624732"
enabled = true
end

function onSelected(mouse)
mouse.Icon = "http://www.roblox.com/asset/?id=11624732"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

script.Parent.Selected:connect(onSelected)
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 10:29 PM
Bump
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 10:30 PM
Bumps
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 10:37 PM
bump
Report Abuse
islandmaker2012 is online. islandmaker2012
Joined: 07 Nov 2012
Total Posts: 9327
15 Feb 2014 11:01 PM
Where does character get defined???
Other than that, I have no idea what this is sposed to do..sooo..superbawmp
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 11:04 PM
-- SonOfSevenless
print("Ice Shard Loaded")

bin = script.Parent
Backpack = bin.Parent
Me = Backpack.Parent
PlayerGui = Me.PlayerGui
Character = Me.Character
Humanoid = Character.Humanoid
Torso = Character.Torso
Head = Character.Head
LeftArm = Character["Left Arm"]
RightArm = Character["Right Arm"]
LeftLeg = Character["Left Leg"]
RightLeg = Character["Right Leg"]
Neck = Torso["Neck"]
RightShoulder = Torso["Right Shoulder"]
LeftShoulder = Torso["Left Shoulder"]
RightHip = Torso["Right Hip"]
LeftHip = Torso["Left Hip"]

NeckC0 = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
NeckC1 = CFrame.new(0, -0.5, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0)
LeftShoulderC0 = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
LeftShoulderC1 = CFrame.new(0.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
RightShoulderC0 = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
RightShoulderC1 = CFrame.new(-0.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
LeftHipC0 = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
LeftHipC1 = CFrame.new(-0.5, 1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
RightHipC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)
RightHipC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0)

function ChakraWelds()
TiltX = 0
TiltY = 0
TiltZ = 1.57
RightShoulder.C0 = RightShoulderC0 * CFrame.Angles(TiltX, TiltY, TiltZ)
LeftShoulder.C0 = LeftShoulderC0 * CFrame.Angles(TiltX, TiltY, -TiltZ)
TiltX = 0.6
TiltY = 0
TiltZ = 0
MoveX = 0
MoveY = 0
MoveZ = -0.3
RightShoulder.C0 = RightShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
LeftShoulder.C0 = LeftShoulder.C0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
TiltX = -0.05
TiltY = 0
TiltZ = 0
MoveX = 0
MoveY = 0.1
MoveZ = 0
RightHip.C0 = RightHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
LeftHip.C0 = LeftHipC0 * CFrame.Angles(TiltX, TiltY, TiltZ) * CFrame.new(MoveX, MoveY, MoveZ)
end

function RefreshWelds()
Neck.C0 = NeckC0
Neck.C1 = NeckC1
RightShoulder.C0 = RightShoulderC0
RightShoulder.C1 = RightShoulderC1
LeftShoulder.C0 = LeftShoulderC0
LeftShoulder.C1 = LeftShoulderC1
RightHip.C0 = RightHipC0
RightHip.C1 = RightHipC1
LeftHip.C0 = LeftHipC0
LeftHip.C1 = LeftHipC1
end

BigShuriken = Instance.new("Part")
BigShuriken.Locked = true
BigShuriken.CanCollide = false
BigShuriken.Name = "BigShuriken"
BigShuriken.TopSurface = "Smooth"
BigShuriken.BottomSurface = "Smooth"
BigShuriken.formFactor = "Symmetric"
BigShuriken.Transparency = 0.2
BigShuriken.Size = Vector3.new(15, 15, 15)
BigShuriken.BrickColor = BrickColor.new(23)
BigShurikenMesh = Instance.new("SpecialMesh")
BigShurikenMesh.Parent = BigShuriken
BigShurikenMesh.MeshType = "Sphere"
BigShurikenMesh.Scale = Vector3.new(1, 1, 1)
BigShurikenGyro = Instance.new("BodyGyro")
BigShurikenGyro.Parent = BigShuriken
BigShurikenGyro.D = 50
BigShurikenGyro.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
BigShurikenVelocity = Instance.new("BodyVelocity")
BigShurikenVelocity.Parent = BigShuriken
BigShurikenVelocity.maxForce = Vector3.new(math.huge, math.huge, math.huge)
Owner = Instance.new("ObjectValue")
Owner.Parent = BigShuriken
Owner.Name = "Owner"
Owner.Value = Me

wait(0.1)

enabled = true
Thing = Character.Occupied

function onButton1Down(mouse)
if not enabled then
return
end

local player = game.Players.LocalPlayer
if player == nil then return end
enabled = false
mouse.Icon = "http://www.roblox.com/asset/?id=41672909"

local pos = mouse.Hit.p


RightShoulder.MaxVelocity = 0
RightShoulder.CurrentAngle = 0
LeftShoulder.MaxVelocity = 0
LeftShoulder.CurrentAngle = 0

Gyro = Instance.new("BodyGyro")
Gyro.Parent = Torso
Gyro.D = 50
Gyro.cframe = Torso.CFrame
Gyro.maxTorque = Vector3.new(math.huge, math.huge, math.huge)
Position = Instance.new("BodyPosition")
Position.Parent = Torso
Position.position = Torso.Position
Position.maxForce = Vector3.new(math.huge, math.huge, math.huge)
Humanoid.PlatformStand = true
Thing.Value = true

Chance = math.random(1, 2)
if Chance == 1 then

RightShoulder.C0 = RightShoulderC0 * CFrame.Angles(0, 0, 3.14)
LeftShoulder.C0 = LeftShoulderC0 * CFrame.Angles(0, 0, -3.14)
wait(1)
Stuff = game.Lighting.SpiritEnergy:clone()
Stuff.Parent = Torso
Rasengan = Instance.new("Part")
Rasengan.Parent = Character
Rasengan.formFactor = "Symmetric"
Rasengan.BrickColor = BrickColor.new(23)
Rasengan.Transparency = 0.2
Rasengan.Name = "Rasengan"
Rasengan.Size = Vector3.new(1, 1, 1)
Rasengan.TopSurface = "Smooth"
Rasengan.BottomSurface = "Smooth"
Rasengan.CFrame = Torso.CFrame
RasenganWeld = Instance.new("Weld")
RasenganWeld.Parent = Torso
RasenganWeld.Part0 = Torso
RasenganWeld.Part1 = Rasengan
RasenganWeld.C0 = CFrame.new(0, 15.3, 0)
wait()
RasenganWeld.C0 = CFrame.new(0, 50.5, 0)
RasenganMesh = Instance.new("SpecialMesh")
RasenganMesh.Parent = Rasengan
RasenganMesh.MeshType = "Sphere"
RasenganMesh.Scale = Vector3.new(0, 0, 0)

Gyro.cframe = CFrame.new(Torso.Position, pos)

Torso.CFrame = Torso.CFrame * CFrame.new(0, 0.1, 0)

for i = 1 , 10 do
RasenganMesh.Scale = RasenganMesh.Scale + Vector3.new(5.5, 5.5, 5.5)
wait(0.1)
end

wait(0.7)
Rasengan:Remove()
ShurikenClone = BigShuriken:clone()
ShurikenClone.Parent = Workspace
ShurikenClone.CFrame = Torso.CFrame * CFrame.new(0, 1, -15.3)
ShurikenClone.BodyGyro.cframe = Torso.CFrame
ShurikenClone.BodyVelocity.velocity = Torso.CFrame.lookVector * math.random(145, 160)
game.Lighting["Spirit Bomb"]:clone().Parent = ShurikenClone
RightShoulder.C0 = RightShoulderC0 * CFrame.Angles(0, 0, 1.57)
LeftShoulder.C0 = LeftShoulderC0 * CFrame.Angles(0, 0, -1.57)
Stuff.Parent = ShurikenClone
wait(1)
RefreshWelds()
end
Model:Remove()
Energy:Remove()
Humanoid.PlatformStand = false
Thing.Value = false
wait(0.5)
RightShoulder.MaxVelocity = 0.15
LeftShoulder.MaxVelocity = 0.15
Gyro.cframe = CFrame.new(0, 0, 0)
RefreshWelds()
wait(0.1)
Gyro:Remove()
Position:Remove()
wait(2)
end
mouse.Icon = "http://www.roblox.com/asset/?id=11624732"
enabled = true
end

function onSelected(mouse)
mouse.Icon = "http://www.roblox.com/asset/?id=11624732"
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end

script.Parent.Selected:connect(onSelected)
thats the script
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
15 Feb 2014 11:09 PM
You have an extra end in the onButton1Down function
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 11:23 PM
do you think there s a way that you can check the output for humanoid cause i tried i don't think i did it right so i started over :l
Report Abuse
iIikeyou is not online. iIikeyou
Joined: 07 Mar 2012
Total Posts: 1659
15 Feb 2014 11:32 PM
At line 181 and 182, what are 'Model' and 'Energy' supposed to be? Those are the wrong variables for whatever object you meant to remove

the other problem is im guessing the end at line 180 is the one you want to erase
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 11:38 PM
this might take some trial and error :l
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
15 Feb 2014 11:40 PM
one thing this original making is from mvpchamp but not functional like his version :l
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
28 Mar 2014 11:59 AM
the energy was suppose to be used inside the dragon ball z game
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
28 Mar 2014 12:01 PM
energy for the game is the charge that you use to use a attack I just want to edit this script so this functions without the check of the charged energy so that it can be used with just a click instead of the energy function.
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
28 Mar 2014 12:04 PM
Meaning that I want to remove the part that checks the GUIS for the power level Ki, and HP bar. Then meaning if I remove those functions which I cant find so it acts like a regular tool just with a click. I do not want to get a whole new script because this makes the shape form of the thrown object and the function that makes particles of blood come out when it hits the humanoid.
Report Abuse
stevenrock99 is online. stevenrock99
Joined: 27 Oct 2011
Total Posts: 402
28 Mar 2014 12:06 PM
Also if there's a way and which line I do the character check please help cause it also does not work as the mouse cursor that allows you to use the tool.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image