A Roblox Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

A Roblox Community

A community of Robloxians who want to learn to script and build on Roblox Studio.
 
HomeLatest imagesRegisterLog in
If you're a experienced coder make some tutorials! It would really help the site grow.
Make sure you read the rules(Which can be found by clicking here)
If you're a beginner at coding, try some tutorials.
We have many Moderators/Admins watching this site. Contact them with Questions.
Let us know what your favorite sport is. By clicking here to vote (Click here)
This site is becoming inactive. Lets make it active.
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Top posters
blueymaddog
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
naknak
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
Supernapalm
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
m27frogy
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
slayer9365
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
myrco919
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
branefreez
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
ninga95
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
CloneTrooper787
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
raboy117
a speaker and touch sensor in 1 Vote_lcapa speaker and touch sensor in 1 Voting_bara speaker and touch sensor in 1 Vote_rcap 
Top posting users this month
No user
Latest topics
» Where to go from here.
a speaker and touch sensor in 1 EmptySeptember 14th 2020, 1:20 pm by MrNicNac

» Send me an Email
a speaker and touch sensor in 1 EmptySeptember 14th 2020, 1:16 pm by MrNicNac

» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]
a speaker and touch sensor in 1 EmptyJuly 6th 2015, 7:38 pm by m27frogy

» New Site Possibly
a speaker and touch sensor in 1 EmptyJuly 6th 2015, 4:16 pm by m27frogy

» Ambassador!
a speaker and touch sensor in 1 EmptyApril 15th 2015, 11:40 pm by naknak

» Boop - Tag
a speaker and touch sensor in 1 EmptyApril 13th 2015, 9:46 pm by naknak

» Vip Class Script
a speaker and touch sensor in 1 EmptyApril 13th 2015, 4:54 pm by naknak

» Who's active?!
a speaker and touch sensor in 1 EmptyApril 13th 2015, 4:52 pm by naknak

» Genesis Point
a speaker and touch sensor in 1 EmptyJuly 17th 2014, 7:04 pm by branefreez

» Reward System
a speaker and touch sensor in 1 EmptyJuly 17th 2014, 5:41 am by m27frogy

» Script Request
a speaker and touch sensor in 1 EmptyJuly 10th 2014, 11:43 am by naknak

» local scripts?
a speaker and touch sensor in 1 EmptyJuly 10th 2014, 11:39 am by naknak

» Project: Reconstruction [Died]
a speaker and touch sensor in 1 EmptyJuly 10th 2014, 11:36 am by naknak

» Hi. I am new here
a speaker and touch sensor in 1 EmptyApril 26th 2014, 4:01 pm by altshiftkey

» What's your favorite sport?
a speaker and touch sensor in 1 EmptyJanuary 1st 2014, 2:13 pm by m27frogy

» FlashLight Script
a speaker and touch sensor in 1 EmptyJanuary 1st 2014, 2:11 pm by m27frogy

» Gun Making! [READ DESC]
a speaker and touch sensor in 1 EmptyJanuary 1st 2014, 2:10 pm by m27frogy

» Hi, I am new here!
a speaker and touch sensor in 1 EmptyNovember 26th 2013, 3:33 pm by Keanu73

» Improve Coding
a speaker and touch sensor in 1 EmptyOctober 26th 2013, 1:12 pm by pook03

» Simple Button
a speaker and touch sensor in 1 EmptySeptember 1st 2013, 6:19 pm by branefreez


 

 a speaker and touch sensor in 1

Go down 
2 posters
AuthorMessage
Guest
Guest
avatar



a speaker and touch sensor in 1 Empty
PostSubject: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyMay 28th 2011, 6:09 pm

what i need to do is make a transparent walkthrough brick that if i can say 'pit' and i am touching it,it does things...

btw i no how to do the transparent non-cancollide thing. i need the script with the onTouched and onChatted and onPlayerEntered thingy... ty

really bad attempt at it but:
Code:

Detector = script.Parent.Detector
function onChatted(msg , speaker)

if msg == "pit" and
function onTouched(touch) = true and
touch.Parent = msg.speaker then
--the stuff in need to do

end
Detector.Touched:connect(onTouched)
end
end


game.Player.Chatted:connect(onChatted)


Back to top Go down
naknak
Administrator
Administrator
naknak


Posts : 878
Join date : 2010-07-30

a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyMay 28th 2011, 11:03 pm

debounce=true
Detector = script.Parent.Detector
function onChatted(msg , speaker)

if msg == "pit" and touc then
if toucher == speaker then
--the stuff in need to do

end

end
end
function onTouched(hit)
if hit:findFirstChild("Humanoid") and debounce then hit.Name=toucher
touc=true
debounce=false
coroutine.create(coroutine.resume(function ()
wait(3)
toucher=nil
debounce=true
touc=false
end end)) end

game.Player.Chatted:connect(onChatted)
Detector.Touched:connect(onTouched)

-----------------------------------------------------
-----------------------------------------------------
It may not work, I am really tired right now. You could probably combine the debounce and touc into just one variable if you felt like it.
Back to top Go down
Guest
Guest
avatar



a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyMay 29th 2011, 12:26 pm

right now the 2 scripts for them are:
Code:

debounce=true
script.Parent.Crew == Crew
Crew:clone() == clone
clone.Parent = game.Lighting
clone:clone() == backup
backup.Parent = game.Lighting

Crew:remove()
Detector = script.Parent.Detector
function onChatted(msg , speaker)

if msg == "pit-a" and touc then
if toucher == speaker then

backup.Parent = game.Workspace
wait(10)
backup:remove()

end

end
end
function onTouched(hit)
if hit:findFirstChild("Humanoid") and debounce then hit.Name=toucher
touc=true
debounce=false
coroutine.create(coroutine.resume(function ()
wait(3)
toucher=nil
debounce=true
touc=false
end end)) end

game.Player.Chatted:connect(onChatted)
Detector.Touched:connect(onTouched)

and

Code:

debounce=true
s1 = script.Parent.D.S1
s2 = script.Parent.U.S2
green = script.Parent.U.G
red = script.Parent.D.R
yellow = script.Parent.D.Y
Detector = script.Parent.Parent.Detector
function onChatted(msg , speaker)

if msg == "pit-a" and touc then
if toucher == speaker then

s1.Transparency = 0
red.Transparency = 0
wait(2.5)
red.Transparency = 1
yellow.Transparency = 0
wait(2.5)
yellow.Transparency = 1
s1.Transparency = 1
s2.Transparency = 0
green.Transparency = 0
wait(5)
green.Transparency = 1
s2.Transparency = 1

end

end
end
function onTouched(hit)
if hit:findFirstChild("Humanoid") and debounce then hit.Name=toucher
touc=true
debounce=false
coroutine.create(coroutine.resume(function ()
wait(3)
toucher=nil
debounce=true
touc=false
end end)) end

game.Player.Chatted:connect(onChatted)
Detector.Touched:connect(onTouched)

how badly wrong are they?
Back to top Go down
Guest
Guest
avatar



a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyMay 29th 2011, 6:32 pm

updated to 1 script...

Code:
debounce=true
s1 = script.Parent.Model.D.S1
s2 = script.Parent.Model.U.S2
green = script.Parent.Model.U.G
red = script.Parent.Model.D.R
yellow = script.Parent.Model.D.Y
script.Parent.Crew == Crew -- tags the crew
Crew:clone() == clone -- makes a clone of it
clone.Parent = game.Lighting -- makes its parent lighting
clone:clone() == backup -- makes a clone of clone
backup.Parent = game.Lighting -- makes its parent lighting
Crew:remove() -- removes crew
Detector = script.Parent.Detector -- tags the detector

function onChatted(msg , speaker)

if (msg == "pit-a") and touc then -- if someone says pit-a
if toucher == speaker then -- and they are the speaker then


backup.Parent = game.Workspace -- changes the parent of backup to workspace
-- this bit is for the lollipop to time the pit...
s1.Transparency = 0
red.Transparency = 0
wait(2.5)
red.Transparency = 1
yellow.Transparency = 0
wait(2.5)
yellow.Transparency = 1
s1.Transparency = 1
s2.Transparency = 0
green.Transparency = 0
wait(5)
green.Transparency = 1
s2.Transparency = 1
backup:remove() -- removes backup

end

end
end
function onTouched(hit)
if hit:findFirstChild("Humanoid") and debounce then hit.Name=toucher -- if hit by a humanoid it is toucher
touc=true
debounce=false
coroutine.create(coroutine.resume(function ()
wait(10) -- wait 10 sec to cancel
toucher=nil -- toucher isnt toucher anymore
debounce=true
touc=false
end end)) end

game.Player.Chatted:connect(onChatted)
Detector.Touched:connect(onTouched)

tried to describe a bit...
Back to top Go down
naknak
Administrator
Administrator
naknak


Posts : 878
Join date : 2010-07-30

a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyJune 10th 2011, 3:11 pm

I'm no where near my normal computer. Just bring up the thing that shows errors in Studio. I forgot what it was called.
Back to top Go down
blueymaddog
Administrator
Administrator
blueymaddog


Posts : 1081
Join date : 2010-12-09
Age : 25

a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyJune 11th 2011, 8:36 am

output.
Back to top Go down
Guest
Guest
avatar



a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyJune 11th 2011, 3:57 pm

went into studio - edit - called the script 'notworkingscript' - opened output - played the map - searched output for the magic works and :


Sat Jun 11 20:50:24 2011 - Running Script 'notworkingscript'
Sat Jun 11 20:50:24 2011 - Workspace.Model.notworkingscript:9: unexpected symbol near '='

help me here. i have almost no idea what this means but the script is...
Code:
script.Parent.Crew = Crew
Crew:remove()
debounce=true
s1 = script.Parent.Model.D.S1
s2 = script.Parent.Model.U.S2
green = script.Parent.Model.U.G
red = script.Parent.Model.D.R
yellow = script.Parent.Model.D.Y
Crew:clone() = clone
clone:clone() = backup

Detector = script.Parent.Detector
function onChatted(msg , speaker)

if (msg == "pit-a") and touc then
if toucher == speaker then


backup.Parent = game.Workspace
s1.Transparency = 0
red.Transparency = 0
wait(2.5)
red.Transparency = 1
yellow.Transparency = 0
wait(2.5)
yellow.Transparency = 1
s1.Transparency = 1
s2.Transparency = 0
green.Transparency = 0
wait(5)
green.Transparency = 1
s2.Transparency = 1
backup:remove()

end

end
end
function onTouched(hit)
if hit:findFirstChild("Humanoid") and debounce then hit.Name=toucher
touc=true
debounce=false
coroutine.create(coroutine.resume(function ()
wait(10)
toucher=nil
debounce=true
touc=false
end end)) end

game.Player.Chatted:connect(onChatted)
Detector.Touched:connect(onTouched)

in comes you ppl.

can you please find the 'unexpected symbol' near one of the ='s?
Back to top Go down
naknak
Administrator
Administrator
naknak


Posts : 878
Join date : 2010-07-30

a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyJune 11th 2011, 5:53 pm

Change the variable "clone" to something else. Like CClone. Using a variable name identical to a global function probably isn't good. I guess you forgot the proper order a variable goes in in the first place, too. I do it sometimes.

CClone = Crew:Clone()
Backup = CClone:Clone()
Back to top Go down
blueymaddog
Administrator
Administrator
blueymaddog


Posts : 1081
Join date : 2010-12-09
Age : 25

a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyJune 16th 2011, 9:16 am

^
Back to top Go down
Guest
Guest
avatar



a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyJune 17th 2011, 2:52 pm

ok ty will try

nope. changed the following

model:clone() = clone -> model:clone() = Cclone
clone:clone() = backup -> Cclone:clone() = backup

what else?
Back to top Go down
blueymaddog
Administrator
Administrator
blueymaddog


Posts : 1081
Join date : 2010-12-09
Age : 25

a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 EmptyFebruary 12th 2012, 4:07 am

make :clone() uppercased since lowercased is depricated...
Back to top Go down
Sponsored content





a speaker and touch sensor in 1 Empty
PostSubject: Re: a speaker and touch sensor in 1   a speaker and touch sensor in 1 Empty

Back to top Go down
 
a speaker and touch sensor in 1
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
A Roblox Community :: Questions and Help :: Scripting-
Jump to: