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: Anyone on? Need GUI help.

Previous Thread :: Next Thread 
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 02:58 PM
Just seeing if there is anyone available to help me. :)
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:00 PM
Yes?
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:02 PM
"Vehicle" Is not spawning at any one of the two locations that is randomly selected.




--- Hard = 1
--- Medium = 2
--- Soft = 3
--- Supersoft = 4

--- Red = "Bright red"
--- Yellow = "Bright yellow"
--- Green = "Bright green"
--- Blue = "Bright blue"
--- Purple = "Bright violet"
math.random(tick())

spawnone = game.Workspace.Spawn1
spawntwo = game.Workspace.Spawn2
--- where the four spawns are
person = script.Parent.Parent.Parent.Parent.Character
disabled = false --- disable use after click
car = game.Workspace.Vehicle
carspawn = (math.random(1, 2))

function spawn()
car = game.Workspace.Vehicle:Clone()
car.Parent = game.Workspace
car:MakeJoints()
wait()
if carspawn == 1 then
car:MoveTo(Vector3.new(spawnone.Position))

elseif carspawn == 2 then
car:MoveTo(Vector3.new(spawntwo.Position))

car.Name = "CAR"
script.Parent.Visible = false
car.Remover.Disabled = false
wait()
disabled = true
end
end


script.Parent.Spawn.MouseButton1Click:connect(spawn)


---removed irrelevant stuff from the script.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:04 PM
May I have the order of everything?
It helps me understand it better.
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:05 PM
Order of everything?
Report Abuse
EliteDerper is not online. EliteDerper
Joined: 05 Feb 2012
Total Posts: 2288
13 Jan 2015 03:07 PM
I think he means with order the locations of all the stuff.
Like:

Workspace
-- Part
---- Script
-- BasePlate
-- Terrain
---- LocalScript
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:07 PM
Yes please.

(ROBLOX is limiting my posts now. Since I am helping so many people...)
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:09 PM
Vehicle and Spawn1 and Spawn 2 are in WorkSpace. The script is in startergui - ScreenGui - Frame.Creation


thank you.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:11 PM
Could you give me in the order that Elite suggested?
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:13 PM
game
-Workspace
--Spawn1
--Spawn2
--Vehicle
--BasePlate


StarterGUI
-ScreenGui
--Frame
---SCRIPT < that one.




I presume this is correct?
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:14 PM
It is just the Random function not working, It clones the car and it is fine, it is just not cloning it to the correct vector3 position, which is one of the two spawn locations (Spawn1 or Spawn2)
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:23 PM
--- Red = "Bright red"
--- Yellow = "Bright yellow"
--- Green = "Bright green"
--- Blue = "Bright blue"
--- Purple = "Bright violet"
math.random(tick())

local spawnone = game.Workspace.Spawn1
local spawntwo = game.Workspace.Spawn2
--- where the four spawns are
local person = script.Parent.Parent.Parent.Parent.Character
local disabled = false --- disable use after click
local car = game.Workspace.Vehicle
local carspawn = (math.random(1, 2))

function spawn()
local carCopy = car:Clone()
carCopy.Parent = game.Workspace
car:MakeJoints()
wait()
if carspawn == 1 then
carCopy:MoveTo(Vector3.new(spawnone.Position))

elseif carspawn == 2 then
carCopy:MoveTo(Vector3.new(spawntwo.Position))

carCopy.Name = "CAR"
script.Parent.Visible = false
carCopy.Remover.Disabled = false
wait()
disabled = true
end
end


script.Parent.Spawn.MouseButton1Click:connect(spawn)

Try That, if that doesn't work. Then I think the:
carCopy.Name = "CAR"
script.Parent.Visible = false
carCopy.Remover.Disabled = false
wait()
disabled = true
end
end

Only works when the value is 2.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:24 PM
Hmmm, Set the PrimaryPart of the Car to the Part you want Car to be.
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:26 PM
Does this have to be a local script or a regular script?
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:28 PM
Should be, try both.
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:29 PM
Both still just spawn in a random place, not at the .position of Spawn1 or Spawn2.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:31 PM
What happens to them?
Do they like fly up? Or spawn like 100 Studs away etc?
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:37 PM
They spawn in the incorrect place. Nothing happens to them.
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:42 PM
halp someone
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:42 PM
Is Spawn1 and Spawn2 Cancollide false?
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:44 PM
Yes, the vehicle is not even spawning anywhere near them, it is spawning in the center of the base plate
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:47 PM
--- Red = "Bright red"
--- Yellow = "Bright yellow"
--- Green = "Bright green"
--- Blue = "Bright blue"
--- Purple = "Bright violet"
math.random(tick())

local spawnone = game.Workspace:WaitForChild("Spawn1")
local spawntwo = game.Workspace:WaitForChild("Spawn2")
--- where the four spawns are
local person = script.Parent.Parent.Parent.Parent.Character
local disabled = false --- disable use after click
local car = game.Workspace:WaitForChild("Vehicle")
local carspawn = (math.random(1, 2))

function spawn()
local carCopy = car:Clone()
carCopy.Parent = game.Workspace
carCopy:MakeJoints()
wait()
if carspawn == 1 then
carCopy:MoveTo(Vector3.new(spawnone.Position))

elseif carspawn == 2 then
carCopy:MoveTo(Vector3.new(spawntwo.Position))
end
carCopy.Name = "CAR"
script.Parent.Visible = false
carCopy.Remover.Disabled = false
wait()
disabled = true
end


script.Parent.Spawn.MouseButton1Click:connect(spawn)

Try that.
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:51 PM
It's like the position thing is not working, although the rest of the script is.
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
13 Jan 2015 03:52 PM
I have to go bed now, I'll check tomorrow. Hopefully someone will help you.
Report Abuse
TOXiCOwNAGE is not online. TOXiCOwNAGE
Joined: 21 Aug 2010
Total Posts: 1102
13 Jan 2015 03:54 PM
Dang. :/
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