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: Please Debug

Previous Thread :: Next Thread 
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
02 May 2014 11:36 PM
--SCRIPT--

local fram = script.Parent.SurfaceGui.Frame
local text = fram.TextLabel
while true do
wait()
if text.Position > UDim2.new(1,0,0,0)then
text.Position = text.Position + UDim2.new(.1,0,0,0)
elseif text.Position == UDim2.new(1,0,0,0) then
text.Position = UDim2.new(-1,0,0,0)
end
end

--ERROR--


22:34:18.571 - Workspace.Part.Script:5: attempt to compare two userdata values
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
03 May 2014 12:03 AM
Please help!
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
03 May 2014 12:57 AM
if text.Position > UDim2.new(1,0,0,0)then



Tell me how you expect it to compare those.
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
03 May 2014 01:15 AM
But it's comparing a UDim2 to another UDim2
Report Abuse
Durfungus is not online. Durfungus
Joined: 07 Feb 2009
Total Posts: 15988
03 May 2014 01:16 AM
.position is a read only value its not 4 udim2 values

[HELP, DURFUNGUS IS SPREADING] Twitter - @Durfungus
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
03 May 2014 01:17 AM
ok so how do I fix that?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
03 May 2014 02:17 AM
But what do you expect it to do?
How do you expect it to compare them?
Think about it

UDim2.new(1, 2, 3, 4)
UDim2.new(4, 3, 2, 1)

Neither one is bigger. They can't be compared.
Report Abuse
georgeba is not online. georgeba
Joined: 29 Oct 2011
Total Posts: 1092
03 May 2014 02:43 AM
Wait, do you mind which telling us which line is line #5?
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
03 May 2014 02:48 AM
...Its this one


if text.Position > UDim2.new(1,0,0,0)then
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
03 May 2014 09:50 AM
ok, but how do I fix it?
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
03 May 2014 10:58 AM
bump
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
03 May 2014 01:26 PM
Well depends, what are you trying to check?
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
03 May 2014 01:33 PM
This script is supposed to make a textlabel continuously scroll across the screen until it gets to the other side, where it is supposed to detect it (that's where the comparing comes in) if it's not to the other side yet, it keeps moving it, but if it is, it teleports it to the beginning
Report Abuse
128GB is not online. 128GB
Joined: 17 Apr 2014
Total Posts: 8056
03 May 2014 01:34 PM
text.Position.X.Scale > 1
Report Abuse
froggodude is not online. froggodude
Joined: 22 Sep 2012
Total Posts: 1638
04 May 2014 12:51 AM
No output, but it still doesn't work
Report Abuse
TheNextEvolution is not online. TheNextEvolution
Joined: 08 Apr 2010
Total Posts: 1624
04 May 2014 03:14 AM
local fram = script.Parent.SurfaceGui.Frame
local text = fram.TextLabel
while true do
wait()
if text.Position >= UDim2.new(1,0,0,0)then
text.Position = text.Position + UDim2.new(.1,0,0,0)
elseif text.Position == UDim2.new(1,0,0,0) then
text.Position = UDim2.new(-1,0,0,0)
end
end
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