|
| 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 |
|
| |
|
| 30 Aug 2014 02:10 AM |
dude you messed up you need to fix something |
|
|
| Report Abuse |
|
|
| 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 |
|