Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

Freezing Death Water Script

Asked by 10 years ago

How do I make a script that functions the same as asimo3089's Winter Games Lodge?

3 answers

Log in to vote
3
Answered by
Trewier 146
10 years ago

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.

1
To add onto this answer, make sure that the "ice" is anchored. That is important. TheLuaWeaver 301 — 10y
0
Thanks, also, this is going into a local script or just a script? Mirror_Master 25 — 10y
0
this should go into a normal script Trewier 146 — 10y
0
Hmmm, it seems to not be working for me. I put the script inside a brick and tested it out but nothing happened. Yeah, I even got the new edited one and it's still not working. :( Mirror_Master 25 — 10y
View all comments (4 more)
0
Fixed. Sorry for the errors, i hadn't tested it. Trewier 146 — 10y
0
Thank you! It worked! Also, another thing? Does this work for a mesh? Mirror_Master 25 — 10y
0
This was already answered in game between us, but I explained that meshes don't collide so this won't. Just for those who are wondering Trewier 146 — 10y
0
You should add a debounce to the script. andreagoingblue 0 — 8y
Ad
Log in to vote
1
Answered by
Mazux 140
10 years ago

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

0
Uhhh. Could you do that on Roblox for me? I'm terrible at gui's? Mirror_Master 25 — 10y
Log in to vote
0
Answered by
Lopous 1
7 years ago

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!

Answer this question