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: Problem here,

Previous Thread :: Next Thread 
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:24 PM
even though this is not highlighted.
in red it still doesn't work on solo.

local part=Game.Workspace.Part
function OnTouch (part)
Part.Transparency= 1
wait (1)
Part.Transparency= 0
end
part.Touched.Connect (OnTouch)


The world fits for every persons need but not for their greed
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:29 PM
bump

The world fits for every persons need but not for their greed
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
03 Mar 2014 01:30 PM
local part=Game.Workspace.Part
function OnTouch (part)
Part.Transparency= 1
wait (1)
Part.Transparency= 0
end
part.Touched:connect(OnTouch)
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:31 PM
^fixes nothin,

The world fits for every persons need but not for their greed
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:38 PM
bump

The world fits for every persons need but not for their greed
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
03 Mar 2014 01:39 PM
I'm not sure what you're trying to do here.
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
03 Mar 2014 01:40 PM
Do you want the part that was touched to become transparent or the part that touched it to become transparent because right now you're trying to make a part that doesn't exist transparent which will result in an error.
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:41 PM
Okay,i made a part,i coloured ti blue,

im trying to make it transparent
then visible again.

The world fits for every persons need but not for their greed
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:42 PM
Part does exist i made it and i put the script,like this

Part
Script

The world fits for every persons need but not for their greed
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:44 PM
B U M P


The world fits for every persons need but not for their greed
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
03 Mar 2014 01:47 PM
local part=Game.Workspace.Part
function OnTouch (part) --the parameter is the part that touched it which is overriding the part variable in the local scope.
Part.Transparency= 1 --Lua is case sensitive and Part was never declared
wait (1)
Part.Transparency= 0 --Lua is case sensitive and Part was never declared
end

part.Touched.Connect (OnTouch) -- it should be Touched:connect
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:48 PM
THATS THE PROBLEM,OH GOD IM SOOO CONFUSED with . and :'s

Thanks :)

The world fits for every persons need but not for their greed
Report Abuse
skyboundShovel is not online. skyboundShovel
Joined: 28 Feb 2014
Total Posts: 232
03 Mar 2014 01:50 PM
This should work...

Debounce = 0
script.Parent.Touched:connect(function()
if Debounce == 0 then
Debounce = 1
script.Parent.Transparency = 1
wait(1)
script.Parent.Transparency = 0
Debounce = 0
end
end)

--Probably a typo of "transparency" in there :P
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:50 PM
Ohh god,still it didn't work..

The world fits for every persons need but not for their greed
Report Abuse
FreeScriptMaker is not online. FreeScriptMaker
Joined: 29 Nov 2013
Total Posts: 2275
03 Mar 2014 01:50 PM
@skyboundShovel
You're not helping if you just give him the answer.
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:52 PM
without the debounce it should work,wiki says so.

The world fits for every persons need but not for their greed
Report Abuse
skyboundShovel is not online. skyboundShovel
Joined: 28 Feb 2014
Total Posts: 232
03 Mar 2014 01:53 PM
@Freescriptmaker

Yes I am, a lot of people learn from free models, and that is giving someone an "answer" and then the said person replicating it. As long as he reads the script he will learn... that is why I named Debounce the way I did, so he could find a reference via the wiki...
Report Abuse
crazynerd11 is not online. crazynerd11
Joined: 07 Oct 2011
Total Posts: 335
03 Mar 2014 01:54 PM
Game=game
Capitals or lowercase on part (local part so Part.Transparency should part.Transparenct)
:connect(OnTouch)
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 01:57 PM
This is what i tried fixing:

local Part= game.Workspace.Part
function OnTouch (part)
Part.Transparency= 1
wait (1)
Part.Transparency= 0
end
Part.Touched:Connect(OnTouch)

The world fits for every persons need but not for their greed
Report Abuse
skyboundShovel is not online. skyboundShovel
Joined: 28 Feb 2014
Total Posts: 232
03 Mar 2014 01:59 PM
If the part your trying to effect is the scripts parent you should simply do
local part = script.Parent
but I guess if that is what you want, here is something that will work... if it doesn't I am going to go head and say that you have multiple parts named "Part" in your workspace...

local part = game.Workspace:findFirstChild("Part")

script.Parent.Touched:connect(function()
part.Transparency = 1
wait(1)
Part.Transparency = 0
end)
Report Abuse
hussaingold is online. hussaingold
Joined: 04 Jul 2012
Total Posts: 5152
03 Mar 2014 02:00 PM
OMG YES it worked i put :Connect instead of :connect

The world fits for every persons need but not for their greed
Report Abuse
wtfsamcrap is not online. wtfsamcrap
Joined: 13 Jan 2013
Total Posts: 509
03 Mar 2014 02:07 PM
My OCDness says you have to put spaces between the = and the text
Report Abuse
Vexedly is not online. Vexedly
Joined: 15 Sep 2006
Total Posts: 7011
03 Mar 2014 03:23 PM
[ Content Deleted ]
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
03 Mar 2014 03:30 PM
Oi Columba..

Please if your going to make it, make it efficient;

P = script.Parent
P.Touched:connect(function()
P.Transparency = 1
wait(1)
P.Transparency = 0
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