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

How to Access variable value?

if mouse.Target.Parent:FindFirstChild("OwnerName")
and

OwnerName value is equal to something -- this is where i don't know how to accomplish

OwnerName is a stringValue inside model

1 answer

Use the Value property of OwnerName:

OwnerName.Value

I also suggest checking if mouse.Target is not nil.

Results,


if mouse.Target then
	if mouse.Target.Parent:FindFirstChild(OwnerName.Value) then
		--stuff
	end
end

1 comment

0

this doesn't work, but i figured out a way.. i just used the StringValue name instead of it's value..

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