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: Weird GUI problem

Previous Thread :: Next Thread 
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
23 Oct 2011 03:20 PM
I am making a donation gui, it works great in play solo, but when I test it in a real server it wont work :l. Any help?
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
23 Oct 2011 03:39 PM
bump?
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
24 Oct 2011 06:07 PM
really no help in 1 day.. :l
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 06:09 PM
Really, expects help without showing code?
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
24 Oct 2011 06:10 PM
Oh sorry forgot xD
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
24 Oct 2011 06:12 PM
local stat = "Cash"
----------------------------------------------------------------------------------
----------------------------------------------------------------------------------

local player = game.Players.LocalPlayer
local gui = script.Parent
local m = gui.Main
local open = gui.Open
local amount = m.Amount
local plyr = m.Player
local title = m.Title
local donate = m.Donate

function playercheck(string)
local count = 0
local valid = {}
for _,v in next, game.Players:GetPlayers() do
if v.Name:sub(0,string:len()):lower() == string:lower() then
count = count+1
table.insert(valid,v)
end
end
if count == 1 then
return valid[1]
end
return false
end

open.MouseButton1Click:connect(function()
if m.Visible then
m.Visible = false
open.Text = "Open Donate"
else
m.Visible = true
open.Text = "Close Donate"
end
end)

donate.MouseButton1Click:connect(function()
local donateamount = tonumber(amount.Text)
if donateamount and donateamount>0 then
local donateplayer = playercheck(plyr.Text)
if donateplayer then
if player.leaderstats[stat].Value >= donateamount then
player.leaderstats[stat].Value = player.leaderstats[stat].Value - donateamount
donateplayer.leaderstats[stat].Value = donateplayer.leaderstats[stat].Value + donateamount
else
title.Text = "You don't have enough "..stat.."."
wait(2)
title.Text = "Donate"
end
else
title.Text = "Not a valid player"
wait(2)
title.Text = "Donate"
end
else
title.Text = "Not a valid amount"
wait(2)
title.Text = "Donate"
end
end)

There :)
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 06:21 PM
Y U NO INDENT?
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
24 Oct 2011 06:23 PM
oh...failure :P
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 06:24 PM
As long as you indent it in your editor, I can see the tabs with the forum enhancer
Report Abuse
Kalandri is not online. Kalandri
Joined: 25 Sep 2010
Total Posts: 26
24 Oct 2011 06:25 PM
Output?
Report Abuse
SlyCat123123Sly123 is not online. SlyCat123123Sly123
Joined: 09 Aug 2010
Total Posts: 663
24 Oct 2011 06:26 PM
Never use LocalPlayer! Use script.Parent.Parent.Etc... If you know what I mean.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 06:27 PM
> Never use LocalPlayer

Why?
Report Abuse
SlyCat123123Sly123 is not online. SlyCat123123Sly123
Joined: 09 Aug 2010
Total Posts: 663
24 Oct 2011 06:28 PM
> Why?

Because it's not as good... Shorter, but you have to check for it or use a LocalScript, but don't get me wrong I love using LocalScripts.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 06:30 PM
> Shorter, but you have to check for it

Why? Isn't it guaranteed?
Report Abuse
SlyCat123123Sly123 is not online. SlyCat123123Sly123
Joined: 09 Aug 2010
Total Posts: 663
24 Oct 2011 06:32 PM
> Why? Isn't it guaranteed?

Stop with the freaking '>' before I knock your teeth in, also no it's not. Lol.
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
24 Oct 2011 06:32 PM
Sly, I'm using a local script
Report Abuse
SlyCat123123Sly123 is not online. SlyCat123123Sly123
Joined: 09 Aug 2010
Total Posts: 663
24 Oct 2011 06:35 PM
Okay then, now use a normal script; then use the parents instead of the LocalPlayer.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
24 Oct 2011 06:35 PM
> Stop with the freaking '>'

Sorry, couldn't resist. It's part of the Forum Enhancer Markdown syntax.

Why isn't it guaranteed to be set when accessed from a `LocalScript`?
Report Abuse
SlyCat123123Sly123 is not online. SlyCat123123Sly123
Joined: 09 Aug 2010
Total Posts: 663
24 Oct 2011 06:41 PM
NXT, I don't know. It should of been like a year ago. I didn't know ROBLOX would screw that up too...
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
24 Oct 2011 06:47 PM
So, what can I do to fix it?
Report Abuse
SlyCat123123Sly123 is not online. SlyCat123123Sly123
Joined: 09 Aug 2010
Total Posts: 663
24 Oct 2011 06:52 PM
Grove, I already told you!
Report Abuse
Grove537 is not online. Grove537
Joined: 05 Feb 2010
Total Posts: 3478
24 Oct 2011 06:54 PM
Oh sorry didn't see that :P
Report Abuse
iMarriedFriedChicken is not online. iMarriedFriedChicken
Joined: 05 Sep 2011
Total Posts: 88
24 Oct 2011 06:55 PM
Sly, that wouldn't fix the problem...
Report Abuse
SlyCat123123Sly123 is not online. SlyCat123123Sly123
Joined: 09 Aug 2010
Total Posts: 663
24 Oct 2011 06:57 PM
Married, it did for me...
Report Abuse
iMarriedFriedChicken is not online. iMarriedFriedChicken
Joined: 05 Sep 2011
Total Posts: 88
24 Oct 2011 06:57 PM
Then post it working.. :l
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