<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=Intro_to_Scripting%3A_Make_a_Healing_Potion</id>
	<title>Intro to Scripting: Make a Healing Potion - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.starfall.wtf/index.php?action=history&amp;feed=atom&amp;title=Intro_to_Scripting%3A_Make_a_Healing_Potion"/>
	<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=Intro_to_Scripting:_Make_a_Healing_Potion&amp;action=history"/>
	<updated>2026-07-28T17:09:14Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://wiki.starfall.wtf/index.php?title=Intro_to_Scripting:_Make_a_Healing_Potion&amp;diff=408&amp;oldid=prev</id>
		<title>PRG: Created page with &quot;{{CatUp|Tutorials}} {{ScriptTutorial|Basic|Brick}} __TOC__  == Introduction ==  For now, this tutorial will show you how to make your brick heal your character when he touches it. #Go to the start from your desktop, and click on Roblox studio. #In Roblox Studio , go into &quot;Edit mode&quot;. #Select the brick you want to modify. #Go to &quot;Insert&quot;, then click object. Then type &quot;Script&quot; in the text box that comes up. #Double-click the script, then a window should pop up. #Remove all...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.starfall.wtf/index.php?title=Intro_to_Scripting:_Make_a_Healing_Potion&amp;diff=408&amp;oldid=prev"/>
		<updated>2024-12-10T12:44:28Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{CatUp|Tutorials}} {{ScriptTutorial|Basic|Brick}} __TOC__  == Introduction ==  For now, this tutorial will show you how to make your brick heal your character when he touches it. #Go to the start from your desktop, and click on Roblox studio. #In Roblox Studio , go into &amp;quot;Edit mode&amp;quot;. #Select the brick you want to modify. #Go to &amp;quot;Insert&amp;quot;, then click object. Then type &amp;quot;Script&amp;quot; in the text box that comes up. #Double-click the script, then a window should pop up. #Remove all...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{CatUp|Tutorials}}&lt;br /&gt;
{{ScriptTutorial|Basic|Brick}}&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
For now, this tutorial will show you how to make your brick heal your character when he touches it.&lt;br /&gt;
#Go to the start from your desktop, and click on Roblox studio.&lt;br /&gt;
#In Roblox Studio , go into &amp;quot;Edit mode&amp;quot;.&lt;br /&gt;
#Select the brick you want to modify.&lt;br /&gt;
#Go to &amp;quot;Insert&amp;quot;, then click object. Then type &amp;quot;Script&amp;quot; in the text box that comes up.&lt;br /&gt;
#Double-click the script, then a window should pop up.&lt;br /&gt;
#Remove all text inside the script, then type:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 function onTouched(part)&lt;br /&gt;
-- All characters have a Humanoid object&lt;br /&gt;
-- If the model has one, it is a character&lt;br /&gt;
 local h = part.Parent:findFirstChild(&amp;quot;Humanoid&amp;quot;) -- Find Humanoids in whatever touched this&lt;br /&gt;
 if (h ~=nil) then -- If there is a Humanoid then&lt;br /&gt;
       h.Health = h.MaxHealth -- Set the health to maximum (full healing)&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
script.Parent.Touched:connect(onTouched) -- Make it call onTouched when touched&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will not disappear when you touch it. If you want it to disappear, add &amp;lt;code&amp;gt;script.Parent:remove()&amp;lt;/code&amp;gt; below &amp;lt;code&amp;gt;h.Health = h.MaxHealth&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Advanced healing for VIPs==&lt;br /&gt;
&lt;br /&gt;
#This will mainly be good for a VIP room. This make their MAX health = 1000, and heals them to their maxhealth.&lt;br /&gt;
*&amp;#039;&amp;#039;&amp;#039;Code&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 function onTouched(part)&lt;br /&gt;
 local h = part.Parent:findFirstChild(&amp;quot;Humanoid&amp;quot;) &lt;br /&gt;
 if (h ~=nil) then -- If there is a Humanoid then&lt;br /&gt;
       h.MaxHealth = 1000&lt;br /&gt;
       h.Health = 1000&lt;br /&gt;
 end&lt;br /&gt;
 end&lt;br /&gt;
&lt;br /&gt;
script.Parent.Touched:connect(onTouched)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Brick-Less Healing(One use)==&lt;br /&gt;
*This is useful if you don&amp;#039;t want people continuously healing.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
bin = script.Parent &lt;br /&gt;
Debounce = false &lt;br /&gt;
function onButton1Down(mouse) &lt;br /&gt;
&lt;br /&gt;
local player = game.Players.LocalPlayer &lt;br /&gt;
if player == nil then return end &lt;br /&gt;
if (Debounce == false) then &lt;br /&gt;
Debounce = true &lt;br /&gt;
local h = player.Character:findFirstChild(&amp;quot;Humanoid&amp;quot;) &lt;br /&gt;
mouse.Icon = &amp;quot;rbxasset://textures\\ArrowCursor.png&amp;quot; &lt;br /&gt;
h.Health = h.Health + 50 --This is how much the player gets healed.&lt;br /&gt;
&lt;br /&gt;
end &lt;br /&gt;
bin:Remove() &lt;br /&gt;
end &lt;br /&gt;
function onSelected(mouse) &lt;br /&gt;
mouse.Icon = &amp;quot;rbxasset://textures\\ArrowCursor.png&amp;quot; &lt;br /&gt;
mouse.Button1Down:connect(function() onButton1Down(mouse) end) &lt;br /&gt;
end &lt;br /&gt;
&lt;br /&gt;
bin.Selected:connect(onSelected)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Just put it into a HopperBin.&lt;br /&gt;
&lt;br /&gt;
==Making a Spawning Health Pack==&lt;br /&gt;
&lt;br /&gt;
Make a [[Part]] and place this in it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
if script.Parent.className ~= &amp;quot;Part&amp;quot; then --Ensures that this is located within a part.&lt;br /&gt;
script:Remove()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function onTouched(hit) --When activated:&lt;br /&gt;
&lt;br /&gt;
local h = hit.Parent:findFirstChild(&amp;quot;Humanoid&amp;quot;)--This searches for a humanoid in whatever it touched.&lt;br /&gt;
if(h ~=nil)then --if a Humanoid tagged as &amp;quot;h&amp;quot; is found&lt;br /&gt;
     h.Health = h.MaxHealth--Sets the humanoid&amp;#039;s max health, as it&amp;#039;s health.&lt;br /&gt;
     script.Parent.Transparency = 1 --This makes said part visible.&lt;br /&gt;
     script.Parent.CanCollide = true --Makes said part solid.&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
script.Parent.Touched:connect(onTouched) --Activates the &amp;quot;onTouched&amp;quot; function.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Scripting Tutorials]]&lt;/div&gt;</summary>
		<author><name>PRG</name></author>
	</entry>
</feed>