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!
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.