hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
|
| 10 Nov 2011 10:23 PM |
| Could someone tell me how I would script a sword so that it would make a dialog and show how much damage you dealt such as in Benjamint and Ninjakid09 RPG |
|
|
| Report Abuse |
|
|
|
| 10 Nov 2011 10:25 PM |
game:Chat(Vector3 position, damage, chatcolor)
Happy? |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
|
| 10 Nov 2011 10:28 PM |
| Well, I could make you the script, but I need a sword script and variables to work with. |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
|
| 10 Nov 2011 10:30 PM |
| Aight , Lots of Thanks ! I'll send you the sword it's in my models . |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
|
| 11 Nov 2011 02:38 AM |
| game:GetService("Chat"):Chat(game.Workspace.Part,"Hello!",Enum.ChatColor.Red) |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
|
| 11 Nov 2011 01:15 PM |
| Whaaa ? Could someone script it for me ? Sorry :/ |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
k9lego
|
  |
| Joined: 24 Dec 2008 |
| Total Posts: 552 |
|
| |
|
k9lego
|
  |
| Joined: 24 Dec 2008 |
| Total Posts: 552 |
|
|
| 11 Nov 2011 02:28 PM |
| Never mind, I don't know how. |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
|
| 11 Nov 2011 07:17 PM |
This wont work try fixing it
r = game:service("RunService") ching = false sword = script.Parent.Handle Tool = script.Parent function blow(hit) if ching == true then return end local humanoid = hit.Parent:findFirstChild("Enemy") 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(0,8) humanoid:TakeDamage(damage) local gui=Instance.new("BillboardGui") gui.Parent=newPlayer.Character.Head gui.Adornee=newPlayer.Character.Head gui.Size=UDim2.new(3,0,3,0) gui.StudsOffset=Vector3.new(0.5,2,0) local text = Instance.new("TextLabel") text.Size = UDim2.new(0,50,0,50) text.Position = UDim2.new(0.45,0,0.25,0) text.Parent = part if (damage == 0) then text.BackgroundColor3 = Color3.new(0/255,102/255,255/255) text.BackgroundTransparency = 0.5 text.BorderSizePixel = 0.5 else text.BackgroundColor3 = Color3.new(255/255,51/255,0/255) text.BackgroundTransparency = 0.5 text.BorderSizePixel = 0.5 end text.Text = ""..damage.."" wait(2) ching = false part:remove() 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 |
|
|
pwnedu46
|
  |
| Joined: 23 May 2009 |
| Total Posts: 7534 |
|
|
| 11 Nov 2011 07:21 PM |
"game:GetService("Chat"):Chat(game.Workspace.Part,"Hello!",Enum.ChatColor.Red)"
I'm 99% sure that's locked. |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
| |
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
| |
|
Toukan
|
  |
| Joined: 24 Jan 2009 |
| Total Posts: 5 |
|
|
| 18 Dec 2011 09:01 AM |
Hello, i'm using this alt because i was banned for 7 days, anyway i got only 1 day left. What i did was just a loop.
Exemple:
myhp=script.Parent.Humanoid.Health
function Damaged(dmg) --dmg is the damages that were caused on 0.5 seconds.
end
while true do wait(0.5) --Check if i got damaged 2 times per seconds, that prevents from Spam. if script.Parent.Humanoid.Health[]myhp then --The health is lower than last time we checked (Replace [] by the Lower sign). Damaged(myhp-script.Parent.Humanoid.Health) end myhp=script.Parent.Humanoid.Health end
-Benjamint's Alt: Toukan |
|
|
| Report Abuse |
|
|
hung999
|
  |
| Joined: 19 Sep 2008 |
| Total Posts: 819 |
|
|
| 18 Dec 2011 12:31 PM |
| That made no sense to me :S |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2011 10:25 PM |
game:GetService("Chat"):Chat(game.Workspace.Part,"Hello!",Enum.ChatColor.Red)
works fine. NARBS |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2011 10:27 PM |
What they're trying very badly to say is:
When you damage, take said damage and hitPlayer's and: game:GetService("Chat",hitPlayer.Head,damage,Enum.ChatColor.Red)
What this does is offer a 'chat' from the hurt Player's head that 'says' damage. |
|
|
| Report Abuse |
|
|