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 » Scripters
Home Search
 

Re: Need Help With Script Error Please :P

Previous Thread :: Next Thread 
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:06 PM
Okay so, I was making a script for a intro gui and I got this error when I was done:
Players.Player1.PlayerGui.Intro.Background.Main:20: bad argument #3 to 'Value' (Vector3 expected, got number)

It said the error was on this line:
AmountOfAssetsLoaded.Value = game.ContentProvider.RequestQueueSize

All I know is it's something to do with Value and Vector.
Also, here's the script:

repeat wait() until game.Players.LocalPlayer:FindFirstChild("PlayerGui")
game.Players.LocalPlayer.PlayerGui:SetTopbarTransparency(0)
local ContentService = game:GetService("ContentProvider")
local Bar = script.Parent.LoadingFrame.Underlayer.Overlay
local logo = script.Parent.Logo
--Start intro
script.Parent.Title.Position = UDim2.new(0,0,-1,0)
logo.Position = UDim2.new(0.15,0,-1,0)
script.Parent.LoadingFrame.Position = UDim2.new(0,0,-1,0)
--End Positioning
--Start moving guis
script.Parent.Title:TweenPosition(UDim2.new(0,0,0.2,0), "In", "Bounce", 2)
script.Parent.LoadingFrame:TweenPosition(UDim2.new(0,0,0.4,0), "In", "Bounce", 2)
wait(3)
--
--Loading bar action
local AmountOfAssetsLoaded = script.Parent.LoadingFrame.AssetsLoaded
local AllAssets = game.ContentProvider.RequestQueueSize
AssetsLoaded = game.ContentProvider.RequestQueueSize
AmountOfAssetsLoaded.Value = game.ContentProvider.RequestQueueSize
while game.ContentProvider.RequestQueueSize > 0 do
if game.ContentProvider.RequestQueueSize < AssetsLoaded then
AmountOfAssetsLoaded.Value = game.ContentProvider.RequestQueueSize
AmountOfAssetsLoaded.Changed:connect(function(assetsToLoad)
local newx = 1 - AmountOfAssetsLoaded.Value / AllAssets
Bar:TweenSize(UDim2.new(newx,0,1,0),"Out","Quad", 0.5, true)
end)
end
wait()
end
Bar:TweenSize(UDim2.new(1,0,1,0),"Out","Quad", 0.5, true)
--End loading bar action
wait(2)
--Send loading bar to the right
script.Parent.LoadingFrame:TweenPosition(UDim2.new(1,0,0.4,0), "Out", "Elastic", 2)
--Send logo down
logo.Visible = true
logo:TweenPosition(UDim2.new(0.15,0,24,0), "In", "Bounce", 3)
wait(3)
Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:08 PM
If you need any more information about the errors please tell me. I want this done fast.. :P
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:11 PM
ngl I have no idea what this script is doing in context but...
Number value --> 1
Vector3 value --> 1, 1, 1


Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:12 PM
What do you mean?
Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:13 PM
Add me as a friend so I can talk to you in a chat or something.
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:15 PM
3D space is represented by 3 planes
a Vector is a direction with a velocity. But in ROBLOX I think it's just a direction. So the three number values in a Vector3 value represent a point on each plane.


Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:16 PM
I still have no idea what that means lmao. Add me and we can talk about it easier.
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:19 PM
I'm way too tired/lazy to figure out what's specifically wrong with this script. But if you do a search for RequestQueueSize on wiki.roblox.com there's probably an article or a property explanation somewhere there for you.


Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:19 PM
I'll take a look at it. :P
Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:21 PM
Also, the error code means this: it received a number wanting a vector
If that helps?

Players.Player1.PlayerGui.Intro.Background.Main:20: bad argument #3 to 'Value' (Vector3 expected, got number)
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:22 PM
ye I was just explaining before that Vector3 is made up of three numbers. Whereas for some reason this is just sending one number when it wants a Vector3


Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:23 PM
So, I just put 3 numbers somewhere like 1,1,1? but, where in the script :/
Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:25 PM
I have to put a number in this line of code?
AmountOfAssetsLoaded.Value = game.ContentProvider.RequestQueueSize
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:27 PM
no because what I think it's doing is checking how much game there is to be loaded before it starts the loading count thingy majig but I don't really know or care.

So the error is probably due either to:
1. AmountOfAssetsLoaded is a Vector3 value object so is expecting to be set as a Vector3 value not a number
OR
2. RequestQueueSize returns a Vector3 value when AmountOfAssetsLoaded is an Intvalue or a number value object.

Both of these seems rather odd errors if you've been building this with an add-on
So you probably need to research into it more than I have knowledge of.


Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:33 PM
AssetsLoaded is a vector 3 if that helps.
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:35 PM
So check what value type RequestQueueSize is. If it's not Vector3 then AmountOfAssetsLoaded is probably your problem.

Did you build this with an add-on or whatever it's called?
If so this seems like an unlikely error, but if changing the object type of AmountOfAssetsLoaded to a number value fixes the issue... Who gives a flying narwhal.


Report Abuse
Snowskateer is not online. Snowskateer
Joined: 06 Dec 2011
Total Posts: 4647
20 Jan 2017 01:36 PM
is this even your script

NOW GATHER, UNDER THE NAME OF TEAM ROCKET!
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:37 PM
@Snow; Debugging other people's code is a great place to start learning.


Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:38 PM
How do I check what value type RequestQueueSize is. and I didn't use this with an addon
Report Abuse
FIyingNarwhaI is not online. FIyingNarwhaI
Joined: 10 Apr 2012
Total Posts: 956
20 Jan 2017 01:39 PM
Ohk it's probably an issue as simple as that then.

Just look up RequestQueueSize on the roblox wiki. It'll say what type it is.


Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:39 PM
@Snow; I watched a Youtube video
Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:41 PM
It says RequestQueueSize is a Value Type: Integer
Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
20 Jan 2017 01:41 PM
Do Vector3.new(val1,val2,val3)
Report Abuse
darthliam2004 is not online. darthliam2004
Joined: 07 Jul 2011
Total Posts: 42
20 Jan 2017 01:41 PM
Where do I type that exactly?
Report Abuse
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
20 Jan 2017 01:41 PM
Where the vector3 is expected
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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