How do I make a script that functions the same as asimo3089's Winter Games Lodge?
something like this:
script.Parent.Touched:connect(function(part) character = part.Parent if character:FindFirstChild("Humanoid") then for i,e in pairs(character:GetChildren()) do if e:IsA("Part") then e.Anchored = true end end ice = Instance.new("Part") ice.Size = Vector3.new(3,6,3) ice.CFrame = character.Torso.CFrame ice.Parent = character -- Parent it so it gets deleted when character dies ice.Anchored = true ice.Transparency = 0.5 ice.BrickColor = BrickColor.new("Toothpaste") ice.TopSurface = "Smooth" ice.BottomSurface = "Smooth" wait(5) -- wait for death health = character.Humanoid.Health while health > 0 do character.Humanoid:TakeDamage(5) -- amount damaged wait(2)--Wait between each damaging end end end)
This is just a rough code, but it should do the trick for you. Have a nice day.
P.S. The script goes inside the part being touched.
Edit: Forgot to anchor ice, thanks to TheLuaWeaver for pointing this out.
Edit: Fixed some spelling mistakes and configured the ice. There you go. Sorry for that.
The freezing bit was very well covered above.
You could also make it take 5 health from the player when touched, the player is frozen so they wouldn't escape, that'd create slow death, like hyperthermia.
I'd also throw in some GUIs for extra cool tequniques.
Add this into a "part" into to work 100%
bin = script.Parent function onTouched(part) part.BrickColor = BrickColor.new(45) wait(.55) part.Reflectance = .2 wait(.5) part.Reflectance = .4 wait(.5) part.Reflectance = .6 wait(.5) part.Reflectance = .8 wait(.1) part.Anchored = true part.CanCollide = true wait(3) part:BreakJoints() part.Anchored = false end connection = bin.Touched:connect(onTouched) --Made By Lopous & TheBossKller5 --Don't do anything unless you know what you're doing!