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: No Output error : No function

Previous Thread :: Next Thread 
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:00 PM
This script spawns a transparent model to a location when the mouse enters the Gui, and removes it when the mouse leaves the Gui. Take a look:







MyGarage = workspace[""..script.Parent.Parent.Parent.Parent.Name.."_Garage"]

for _,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("CarBaseValue") then
v.MouseEnter:connect(function(Click)
Clone = v.CarBaseValue.Value
Cloned = game.Lighting.Clone:Clone()
for i = 1,#Cloned do
if Cloned[i]:IsA("Part") then
Cloned[i].TransParency = 0.5
Cloned[i].Anchored = true
wait()
end
end
Cloned.Parent = MyGarage
Cloned:MoveTo(MyGarage.PlatForm.Position)
Cloned:MakeJoints()
end)
end
end

for _,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("CarBaseValue") then
v.MouseLeave:connect(function(Click)
Cloned:Remove()
end)
end
end
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:02 PM
Maybe where I cloned and made the model is where the error might be located,
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:07 PM
Here's an edit, still not working though




MyGarage = workspace[""..script.Parent.Parent.Parent.Parent.Name.."_Garage"]

for _,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("CarBaseValue") then
v.MouseEnter:connect(function(Click)
Clone = v.CarBaseValue.Value
Cloned = game.Lighting[Clone]:Clone()
for i = 1,#Cloned do
if Cloned[i]:IsA("Part") then
Cloned[i].TransParency = 0.5
Cloned[i].Anchored = true
wait()
end
end
Cloned.Parent = MyGarage
Cloned:MoveTo(MyGarage.PlatForm.Position)
Cloned:MakeJoints()
end)
end
end

for _,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("CarBaseValue") then
v.MouseLeave:connect(function(Click)
Cloned:Remove()
end)
end
end
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:11 PM
This script isn't very complicated, in fact it's very easy to disect

*Spy voice* "A little assistance?"
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:18 PM
I tried to debug it with print, even the first print didn't register so the script isn't running


PS guys, stop making me talk to myself :P
Report Abuse
luffy555555 is not online. luffy555555
Joined: 30 Jul 2008
Total Posts: 958
07 Jul 2011 04:21 PM
I've never used GUI's before, but I'll try to help. :P
Where in the code was the print anyway?
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:23 PM
Every line :P

You know luffy, this is coding for your idea that you gave my for designing your own car
Report Abuse
luffy555555 is not online. luffy555555
Joined: 30 Jul 2008
Total Posts: 958
07 Jul 2011 04:27 PM
Yeah, I noticed when I saw the word 'garage'.
And you're saying the script doesn't even get past defining the variable? Is the script disabled?
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:29 PM
Nope
Report Abuse
luffy555555 is not online. luffy555555
Joined: 30 Jul 2008
Total Posts: 958
07 Jul 2011 04:30 PM
Ok then... Is the script a LocalScript? It might be under the wrong parent if it is.
If that isn't the case, then I have no clue what might be the problem. :o
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:31 PM
It's a normal script. I only use Local script if I need Camera positioning
Report Abuse
Horanoven is not online. Horanoven
Joined: 11 Jul 2008
Total Posts: 11034
07 Jul 2011 04:34 PM
1: "TransParency"? Whats with the Capital P?

2: I haven't worked much with GUIs. When I run into a problem where I don't get an output, I generally put "print("#")" under lines with if, for, while, function, ect. I'm sorry if you've already tried this, but thats all I can offer.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:36 PM
It still doesn't work, but yes, that transparency was wrong
Report Abuse
Horanoven is not online. Horanoven
Joined: 11 Jul 2008
Total Posts: 11034
07 Jul 2011 04:37 PM
Check where the "prints" stop.
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:42 PM
Fixed alot of it now, having trouble with the for loop;





for _,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("CarBaseValue") then
v.MouseEnter:connect(function()
MyGarage = workspace[""..script.Parent.Parent.Parent.Parent.Name.."_Garage"]
Clone = v.CarBaseValue.Value
Cloned = game.Lighting[Clone]:Clone()
Cloned.Parent = MyGarage
Cloned:MoveTo(MyGarage.PlatForm.Position)

for i = 1,#Cloned do --HERE: Players.Player.PlayerGui.ScreenGui.CarBase.Script:9: attempt to get length of global 'Cloned' (a userdata value)

if Cloned[i]:IsA("Part") then
Cloned[i].Transparency = 0.5
Cloned[i].Anchored = true
wait()
end
Cloned:MakeJoints()
end
end)
end
end

for _,v in pairs(script.Parent:GetChildren()) do
if v:FindFirstChild("CarBaseValue") then
v.MouseLeave:connect(function()
Cloned:Remove()
end)
end
end
Report Abuse
luffy555555 is not online. luffy555555
Joined: 30 Jul 2008
Total Posts: 958
07 Jul 2011 04:50 PM
Cloned isn't a table. (I'm not the best scripter, so I may be missing something.)
Report Abuse
MARIOSTAR6464 is not online. MARIOSTAR6464
Joined: 21 Jul 2008
Total Posts: 13674
07 Jul 2011 04:52 PM
I fixed it all, thanks guy, good night
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