I basically want to make a simple timestop project and i want to make some touch events for freezing the players and making different effects.
COMMUNITY QUESTION
any ways to make a touch event to anchor a player completly?
1 answer
You can easily do this with Mayor FumbleBottoms amazing simple script I made below.
Put this in a ServerScript and drag it into a part.
script.Parent.Touched:Connect(function(touchitem)
if touchitem and touchitem.Parent and touchitem.Parent:FindFirstChild("Humanoid") and touchitem.Parent:FindFirstChild("HumanoidRootPart") then
for i,v in pairs(touchitem.Parent:GetChildren()) do
if v:IsA("MeshPart") or v:IsA("Part") then
v.Anchored = true
end
end
end
end)
If you'd like to reverse the effect, Heres another script that wears off after a certain amount of time.
script.Parent.Touched:Connect(function(touchitem)
if touchitem and touchitem.Parent and touchitem.Parent:FindFirstChild("Humanoid") and touchitem.Parent:FindFirstChild("HumanoidRootPart") then
spawn(function()
local debounce = false
for i,v in pairs(touchitem.Parent:GetChildren()) do
if v:IsA("MeshPart") or v:IsA("Part") then
v.Anchored = true
debounce = true
wait(3)
v.Anchored = false
wait(5)
debounce = false
end
end
end)
end
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.

2 comments
hoping for a simple way to do this
also heres what i have local function onTouch(hit) hit:remove() end script.Parent.Touched:connect(onTouch)