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
 

Re: Need someone to debug a script for me

Previous Thread :: Next Thread 
crome60 is not online. 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 is not online. UnAdmin
Joined: 10 Jul 2012
Total Posts: 4706
21 Sep 2013 05:48 PM
post it here
get help
???
profit
Report Abuse
crome60 is not online. 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 is not online. 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 is not online. 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 is not online. 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 is not online. 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
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