OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 06:27 PM |
I tried doing
if player.Name == "OmariHero" then label.Text = "Owner" end
but it doesnt work..
player = game.Players.LocalPlayer local Players = game:GetService("Players") local races = {"Human", "Human", "Human", "Human", "Human","Human", "Human", "Human", "Human", "Human", "Human", "Human", "Fanalis", "Fanalis", "Fanalis", "Magician"} label = game.StarterGui.ScreenGui.Frame.TextLabel math.randomseed(tick())
Players.PlayerAdded:connect(function(onPlayerAdded) local ranRace = races[math.random(1,#races)] label.Text = ranRace if label.Text == "Human" then game.StarterGui.ScreenGui.Frame.ImageLabel.Image = "http://www.roblox.com/asset/?id=393676778" end if label.Text == "Fanalis" then game.StarterGui.ScreenGui.Frame.ImageLabel.Image = "http://www.roblox.com/asset/?id=393679645" end
if label.Text == "Magician" then game.StarterGui.ScreenGui.Frame.ImageLabel.Image = "http://www.roblox.com/asset/?id=393676712" game.ReplicatedStorage.Wand:Clone().Parent = player.Backpack end end)
drazonehero's not main |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 06:29 PM |
| Did you try it in a published place. Testing it in studio will make it so your name is either "Player" or "Player1." |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 06:29 PM |
i'm a beginner pls
drazonehero's not main |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 06:29 PM |
yes i did , still gave me the randomized race
drazonehero's not main |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 06:32 PM |
or a link to a video or wiki page that would help with this would be nice :)
drazonehero's not main |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 06:35 PM |
yaaa baby
drazonehero's not main |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 06:41 PM |
is it that hard?
drazonehero's not main |
|
|
| Report Abuse |
|
|
Silicti
|
  |
| Joined: 07 Nov 2012 |
| Total Posts: 8242 |
|
|
| 04 Apr 2016 06:48 PM |
Mistake 1: LocalPlayer can't be defined in a serverscript.
Do this:
game.Players.PlayerAdded:connect(function(player) if player.Name == "yourusernamehere" then -- put your function here end end)
Make sure this is in a REGULAR script. |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 06:54 PM |
or you could make a table/array to verify if the username is in a list of allowed member like
Members = {"Usernamehere",} --Add more username with "NAMEHERE" and dont forget a ,
for i,players in pairs (Members) do if game.Players.LocalPlayer.Name == players then -- do stuff here end end
Might be not perfect but still close.
|
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 06:54 PM |
| My bad I posted this post in the wrong thread I was on multiple thread ignore my post. |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 07:19 PM |
neither work :(
drazonehero's not main |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 07:22 PM |
| because your editing the gui in startergui |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 07:23 PM |
so i should edit it in playergui?
drazonehero's not main |
|
|
| Report Abuse |
|
|
OmariHero
|
  |
| Joined: 14 Aug 2013 |
| Total Posts: 4193 |
|
|
| 04 Apr 2016 07:25 PM |
scripting is so confusing but it'll be worth it in the long run
drazonehero's not main |
|
|
| Report Abuse |
|
|
|
| 04 Apr 2016 07:28 PM |
| edit it in the players playergui, yeah |
|
|
| Report Abuse |
|
|