How do I make a script that functions the same as asimo3089's Winter Games Lodge?
something like this:
01 | script.Parent.Touched:connect( function (part) |
02 | character = part.Parent |
03 | if character:FindFirstChild( "Humanoid" ) then |
04 | for i,e in pairs (character:GetChildren()) do |
05 | if e:IsA( "Part" ) then |
06 | e.Anchored = true |
07 | end |
08 | end |
09 | ice = Instance.new( "Part" ) |
10 | ice.Size = Vector 3. new( 3 , 6 , 3 ) |
11 | ice.CFrame = character.Torso.CFrame |
12 | ice.Parent = character -- Parent it so it gets deleted when character dies |
13 | ice.Anchored = true |
14 | ice.Transparency = 0.5 |
15 | ice.BrickColor = BrickColor.new( "Toothpaste" ) |
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.
Damaging:
Player.Humanoid.Health -10
Add this into a "part" into to work 100%
01 | bin = script.Parent |
02 |
03 | function onTouched(part) |
04 | part.BrickColor = BrickColor.new( 45 ) |
05 | wait(. 55 ) |
06 | part.Reflectance = . 2 |
07 | wait(. 5 ) |
08 | part.Reflectance = . 4 |
09 | wait(. 5 ) |
10 | part.Reflectance = . 6 |
11 | wait(. 5 ) |
12 | part.Reflectance = . 8 |
13 | wait(. 1 ) |
14 | part.Anchored = true |
15 | part.CanCollide = true |