Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

possible to make a health script potion ?

I made a health potion script but it won't work the title is weird cuz bot is calling my title spam

script:

local heal = game.ReplicatedStorage.ShootingStuff.HealPotion
local tool = script.Parent.Handle
local cap = script.Parent.Cap

script.Parent.Equipped:Connect(function(mouse)
	mouse.Button1Down:Connect(function()
	local throw = heal:Clone()
	throw.Parent = workspace
	throw.PrimaryPart.Position = tool.Position
	throw.Juice.Position = tool.Position
	throw.Cap.Position = cap.Position
	script.Parent.Handle:Destroy()
	script.Parent.Cap:Destroy()
	script.Parent.Juice:Destroy()
	wait(0.25)
	
	local h = script.Parent.Parent:FindFirstChild("Humanoid")
	if h then
		if h.Health > 0 then
			
	
		h.Health = h.Health + 50
		end
	end
	
	local particles = game.ReplicatedStorage.Particles["Heal Effect"]
	particles.Parent = workspace.HealPotion.Juice
	wait(3.5)
	throw:Destroy()
	script.Parent:Destroy()
	end)
end)

1 answer

the problem is in tools the script doesn't work if cloned (its a glitch in rob lox they should fix in the future,as far as i know of)

so you could make a health potion gui?

heal button:

script.Parent.MouseButton1Click:Connect(function()
if game.Players.LocalPlayers.Health >== 50 then
game.Players.LocalPlayers.Character.Humanoid.Health = game.Players.LocalPlayers.Character.Humanoid.Health + 50
script.Disabled = true
end
end)

7 comments

0

there's no ui

0

I'm saying make one

0

I'm not cloning the tool I'm cloning a model

0

same thing did it work?

0

oh I get it I'll make a other script

0

ya but a local script in a text button

0

please help its me Cats767_99 and I'm suspended :(

This discussion is preserved as it was. New answers, comments, and votes are closed.