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

why wont this script change a boolean value?

script.Parent.Touched:connect(function(hit)
	if hit.Parent:FindFirstChild("Humanoid") ~= nil then
		if hit.Parent:FindFirstChild("Humanoid").Sit.Value == false then
			hit.Parent:FindFirstChild("Humanoid").Sit.Value = true
		end
	end
end)

i just made this simple script so when a player touches the brick in workspace then he sits down.

1 answer

✓ Accepted answer

You just need to set the value of sit, sit does not have an object called "Value"

script.Parent.Touched:connect(function(hit)
    if hit.Parent:FindFirstChild("Humanoid") ~= nil then
        if hit.Parent:FindFirstChild("Humanoid").Sit == false then
            hit.Parent:FindFirstChild("Humanoid").Sit = true
        end
    end
end)

Hope this helps

2 comments

0

ahh ok

0

i didnt know that ty

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