ontouch()
game.workspace.platform.cancolide= false
game.workspace.playform.transparency (1)
wait (10)
game.workspace.platform.cancolide= true
game.workspace.playform.transparency (0)
can someone help make this work?
ontouch()
game.workspace.platform.cancolide= false
game.workspace.playform.transparency (1)
wait (10)
game.workspace.platform.cancolide= true
game.workspace.playform.transparency (0)
can someone help make this work?
Here, try this instead;
local debounce = false --I added debounce
if game:FindService("Workspace")and game.Workspace:FindFirstChild("PartNameHere")then --If script finds the service 'workspace' and finds PartNameHere (Switch the PartNameHere parts with the part you want the script to work on) then it will do the below \/
game.Workspace.PartNameHere.Touched:connect(function() --If touched then
if not debounce then --If debounce is false
debounce = true --Returns debounce to true
game.Workspace.PartNameHere.CanCollide = false --Walk-Throughable
game.Workspace.PartNameHere.Transparency = 1 --Invisible
wait(10) --Waits 10 before can be touched again
debounce = false --Returns debounce false again
game.Workspace.PartNameHere.CanCollide = true --Not Walk-Throughable anymore
game.Workspace.PartNameHere.Transparency = 0 --Visible again
end end)end --All the ends for the 'if' statements and that event up there
I hope this helped!
wow this is great, i didn't think about debounce.
No problem. ;)
why is it not creating ontouch?
Nvm, I fixed it.
There is something called FindService? Never heard of it, hmm.
Ya, there is, I'm sure it is like the 'FindFirstChild()' string, but it finds the Service (Like Workspace, Lighting, NetworkServer, ect.)
function onTouched(hit)
h = game.Workspace:FindFirstChild("Humanoid")
game.workspace.platform.CanCollide= false
game.workspace.platform.Transparency=("1")
wait (10)
game.workspace.platform.CanCollide=true
game.workspace.platform.Transparency=("0")
end
script.Parent.touched:connect(onTouched)
Spelling and Capitalization Count In scripting.
This discussion is preserved as it was. New answers, comments, and votes are closed.
2 comments
What are you exactly trying to do?
make a button that make a platform appear...