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

Changing the value from script is not working, ?

local DIE = script.Parent
function onTouch(BRICKIE)
	    local PLAYERZ = BRICKIE.Parent:findFirstChild("Humanoid")
	local POINTS = game.Workspace.Stage
	if(PLAYERZ~=nil)then
		PLAYERZ.Health = PLAYERZ.Health - 100
		PLAYERZ.POINTS.Value = 37
		print("you CHOOSED WRONG ONE!")
	end
end
DIE.Touched:connect(onTouch)

This is the script and I don't know what I missed. Can anyone answer me?

3 comments

2

Tell us what is the problem.

0

What is the problem, what does the output say?

0

your variable names are cancer

1 answer

Luist made som valueable points.

script.Parent.Touched:connect(function(hit)
	local Humanoid = hit.Parent:FindFirstChild("Humanoid") if Humanoid ~= nil and hit.Parent.Name ~= "whatever you want" then
		Humanoid.Health = 0
	end
end)

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