How do I insert a UI?
#1
I can't find a Start UI folder or anything like that.

Oh and are the UI's similar to roblox's?
[Image: AmZJnA9.png]
Reply
#2
I'd assume you start by adding a Character, building the UI in the PlayerUI of it, then when you're done, put it inside a Script in the workspace that copies it into their PlayerUI.
Reply
#3
You can store the UI anywhere, then use a script to copy it into new players, or just generate it with a script every time someone joins.
Reply
#4
Can someone post a script for this? xD

I'm not to good at lua lol
[Image: AmZJnA9.png]
Reply
#5
I don't get it... Where does UI have to be so that a player can see it on-screen?
Reply
#6
game.Players.Player.UI
Reply
#7
Thanks!

Also, I already made a health bar UI, the only problem is after dying, the script won't run again, so the bar just stays red. Help?
Reply
#8
(06-03-2011, 03:08 PM)Jacob_ Wrote: game.Players.Player.UI

So that's how it's done.
Reply
#9
(06-03-2011, 03:16 PM)AK-47 Wrote: Thanks!

Also, I already made a health bar UI, the only problem is after dying, the script won't run again, so the bar just stays red. Help?

Wouldn't something like this work?

[lua]
link(game.World.ChildAdded, function( c )
if c:isA("Character") then
local player = game.Players[c.Name]
--create UI
link(c.PropertyChanged, function(name, value)
if name == "Health" then
--update health bar
end
end
end
end)
[/lua]
Reply
#10
[lua]
function onEnter( c )
if c:isA("Character") then
local player = game.Players[c.Name]
local HealthScript = script.Parent.HealthScript:clone()
HealthScript.Parent = player.UI
end
end
link(game.World.ChildAdded, onEnter)
[/lua]

But it won't work. (I'll work on the updater later)
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)