You can write your topic however you want, but you need to answer these questions:
What do you want to achieve? I want it so the player jumps on the block and then the block proceeds to fall.
What is the issue? It works first and then when you step on it Again it disapears robloxapp-20210130-1656278.wmv (1.5 MB)
What solutions have you tried so far? I have tried wrapping it in a while loop
heres my code
debounce = true
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local debounce = false
wait(0.2)
script.Parent.Anchored = false
wait(1.5)
script.Parent.CFrame = CFrame.new(-35.987, 0.38, -318.604)
script.Parent.Anchored = true
debounce = false
end
end)
end
Help would be appreciated and needed thanks!
EntryRoot
(EntryRoot)
January 30, 2021, 10:10pm
2
Kykysurvivin:
debounce = true
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local debounce = false
wait(0.2)
script.Parent.Anchored = false
wait(1.5)
script.Parent.CFrame = CFrame.new(-35.987, 0.38, -318.604)
script.Parent.Anchored = true
debounce = false
end
end)
end
I believe you put an extra “end” right at the bottom of the script. Try removing that,
this would be the code without an extra “end”:
debounce = true
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then
local debounce = false
wait(0.2)
script.Parent.Anchored = false
wait(1.5)
script.Parent.CFrame = CFrame.new(-35.987, 0.38, -318.604)
script.Parent.Anchored = true
debounce = false
end
end)
[/quote]
If this doesn’t fix it, please show me the error you are receiving.
1 Like
Hey, I tried and it worked the same kicking me off you can see an example video by clicking that file, And I don’t think I had an Extra end because I had the end for the function and the wait loop and the then. I don’t get an error though. It just doesn’t work the same way.