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

why when i click it doesnt get destroyed nor add to the IntValue??

local plr = game.Players.LocalPlayer
local AnimalsValue = plr.AnimalsFoundValue.Value
--gets the local player and IntValue
script.Parent.ClickDetector.MouseClick:Connect(function()
	AnimalsValue.Value = AnimalsValue.Value +1
	--adds to the IntValue
	script.Parent:Destroy()
	--Destroys the item so the player can no longer click
end)

1 answer

line 2 gets the .Value, and line 5 also uses .Value

youre saying AnimalsValue.Value.Value

thats alotta value...

i would remove the .Value from line 2

3 comments

0

it didnt work :(

0

well whats the error

0

no error in the output just the same problems in the question.

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