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 » Roblox » All Things ROBLOX
Home Search
 

My RPG swords breaks need help!

Previous Thread :: Next Thread 
AamunkoittoAlt is not online. AamunkoittoAlt
Joined: 27 May 2013
Total Posts: 3835
30 Aug 2014 02:08 AM
I just made an sword shop that sells swords from iron to ancient and they worked nice untill i killed monster then after it that sword doesnt do anything untill you reset and you can kill another time once and its bugged again if you can help please send me message oh also heres the scripts of steel sword;

r = game:GetService("RunService")
ching = false
sword = script.Parent.Handle
Tool = script.Parent
function blow(hit)
if ching == true then return end
local humanoid = hit.Parent:FindFirstChild("Human")
local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)
if humanoid~=nil then
ching = true
print("SWORD HIT")
tagHumanoid(humanoid, vPlayer)
local damage = math.random(script.Parent.MinDmg.Value+math.floor(vPlayer.attributes.Strength.Value/2),script.Parent.MaxDmg.Value+math.floor(vPlayer.attributes.Strength.Value/2))+math.floor(vPlayer.leaderstats.Lvl.Value/5)
humanoid:TakeDamage(damage)
local part = Instance.new("BillboardGui")
part.Size = UDim2.new(0,50,0,100)
part.StudsOffset = Vector3.new(0,2,0)
local part2 = Instance.new("TextLabel")
dt = Game.Workspace.DynamicText:Clone()
part2.Font = "ArialBold"
part2.FontSize = "Size24"
part2.TextStrokeTransparency = 0
part2.Size = UDim2.new(1,0,1,0)
part2.Position = UDim2.new(0,0,0,0)
part2.BackgroundTransparency = 1
part2.Parent = part
dt.Parent = part2
dt.Disabled = false
part.Parent = humanoid.Parent.Head
part.Adornee = part.Parent
if (damage == 0) then
part2.TextColor3 = Color3.new(0/255,102/255,255/255)
else
part2.TextColor3 = Color3.new(255/255,255/255,255/255)
end
part2.Text = ""..damage..""
wait(1)
ching = false
wait(.1)
untagHumanoid(humanoid)
end
end

function tagHumanoid(humanoid, player)
local creator_tag = Instance.new("ObjectValue")
creator_tag.Value = player
creator_tag.Name = "creator"
creator_tag.Parent = humanoid
end

function untagHumanoid(humanoid)
if humanoid ~= nil then
local tag = humanoid:findFirstChild("creator")
if tag ~= nil then
tag.Parent = nil
end
end
end


function attack()
local anim = Instance.new("StringValue")
anim.Name = "toolanim"
anim.Value = "Slash"
anim.Parent = Tool
end

function lunge()

local anim = Instance.new("StringValue")
anim.Name = "toolanim"
anim.Value = "Lunge"
anim.Parent = Tool


force = Instance.new("BodyVelocity")
force.velocity = Vector3.new(0,10,0) --Tool.Parent.Torso.CFrame.lookVector * 80
force.Parent = Tool.Parent.Torso
wait(.25)
swordOut()
wait(.25)
force.Parent = nil
wait(.5)
swordUp()

damage = slash_damage
end

function swordUp()
Tool.GripForward = Vector3.new(-1,0,0)
Tool.GripRight = Vector3.new(0,1,0)
Tool.GripUp = Vector3.new(0,0,1)
end

function swordOut()
Tool.GripForward = Vector3.new(0,0,1)
Tool.GripRight = Vector3.new(0,-1,0)
Tool.GripUp = Vector3.new(-1,0,0)
end

function swordAcross()
-- parry
end


Tool.Enabled = true

function onActivated()

if not Tool.Enabled then
return
end

Tool.Enabled = false

local character = Tool.Parent;
local humanoid = character.Humanoid
if humanoid == nil then
print("Humanoid not found")
return
end

attack()

wait(1)

Tool.Enabled = true
end


function onEquipped()

end


script.Parent.Activated:connect(onActivated)
script.Parent.Equipped:connect(onEquipped)


connection = sword.Touched:connect(blow)
Report Abuse
AamunkoittoAlt is not online. AamunkoittoAlt
Joined: 27 May 2013
Total Posts: 3835
30 Aug 2014 02:09 AM
B1
Report Abuse
P0Ptartfudge is not online. P0Ptartfudge
Joined: 13 Nov 2011
Total Posts: 19577
30 Aug 2014 02:10 AM
dude you messed up
you need to fix something
Report Abuse
HaveGunWillFire is not online. HaveGunWillFire
Joined: 15 Dec 2009
Total Posts: 748
30 Aug 2014 02:11 AM
I'm pretty sure this is the wrong forum for this type of question but... I could care less ;)

Buy a snake, Take it on a plane.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Roblox » All Things ROBLOX
   
 
   
  • 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