crome60
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 15266 |
|
|
| 21 Sep 2013 05:45 PM |
Cant post it here because you guy would just say "use a localscript"
So if I have someone to personally debug the model/script for me, that would be better because they would actually know what it is. |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 21 Sep 2013 05:48 PM |
post it here get help ??? profit |
|
|
| Report Abuse |
|
|
crome60
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 15266 |
|
|
| 21 Sep 2013 05:52 PM |
Alright, it works in solo but not in online. By that I mean the Tagged value is not going to be the Player's name in online, but in solo it is. No I can't use a localscript, that would mess everything up I know the LocalPlayer is the problem, I just cant figure out how to fix it.
local Target = game.Players.LocalPlayer -------------------------------------------- CombatActive = script.Parent.CombatActive.Value -------------------------------------------- if CombatActive == true then script.Parent.Parent.SwordCombatAnim.Disabled = false end -------------------------------------------- function Display(Player) local f = Instance.new("TextLabel") local e = Instance.new("TextLabel") local s = Instance.new("ScreenGui") s.Name = "EnemyHealth" f.Parent = s e.Parent = s s.Parent = Player.PlayerGui f.Position = UDim2.new(0.300000012, 0, 9.09999969e-008, 0) f.Size = UDim2.new(0.400000048, 0, 0.100000001, 0) e.Position = UDim2.new(0.435000012, 0, 9.09999969e-008, 0) e.Size = UDim2.new(0.130000048, 0, 0.020000001, 0) f.BackgroundColor3 = BrickColor.new('Bright red').Color e.BackgroundColor3 = BrickColor.new('Sand red').Color script.Parent.ClickDetector:Remove() if Target then script.Parent.Parent.Tagged.Value = Target.Name end while true do f.Text = script.Parent.Parent.Humanoid.Health e.Text = script.Parent.Parent.Name wait() if script.Parent.Parent.Humanoid.Health == 0 then wait(3) script.Parent.Parent:Destroy() s:Destroy() end end end script.Parent.ClickDetector.MouseClick:connect(Display) -------------------------------------------- |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 21 Sep 2013 05:54 PM |
| Can you explain why using a localscript would mess it up? |
|
|
| Report Abuse |
|
|
crome60
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 15266 |
|
|
| 21 Sep 2013 05:57 PM |
The script is in an AI, if I used a localscript, it wouldn't function because it would just ignore that said script.
How would I use a local script in a server-side object? |
|
|
| Report Abuse |
|
|
UnAdmin
|
  |
| Joined: 10 Jul 2012 |
| Total Posts: 4706 |
|
|
| 21 Sep 2013 06:10 PM |
Problem with your thinking even if you could set it to local player if there are multiple people in the game it would try to go to every one of them |
|
|
| Report Abuse |
|
|
crome60
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 15266 |
|
|
| 21 Sep 2013 07:04 PM |
| Un, can I give you the model so you can fix it for me? I really have no idea what to do here.. |
|
|
| Report Abuse |
|
|