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

Hello im trying to make a raise a floppa game but i get this werid error?

So basically im tryign to make a raise a floppa inspired game but this error comes up in this script

script.Parent:GetPropertyChangedSignal("Value"):Connect(function()
	game.Workspace.Square.Cigar.Transparency = 0
end)

so its like when you buy it it becoms visible and gives you x2 cash

the error says:

Cigar is not a valid member of Model "Workspace.Square"

Cigar is what the actual part that it supposed to give x2 cash and the square is the floppa. The Cigar is inside the Square. teh square is in the workspace. The Cigar is a part and teh Square is a model

3 comments

0

Please elaborate, what is "square" is it a model or part, what is it? And also, what is cigar, is it a model or part, what is it?

0

Also, what is cigars parent and square's parent?

0

What could it mean other than that SQUARE DOESN'T EXIST IN WORKSPACE?

2 answers

Perhaps check that cigar is 100% a child of the square?

2 comments

0

what do you mean PandaKai

0

Check is cigar is under squre

localscripts won't "have" every instance from the server for a brief moment (e.g. when the player is loading into the game) so you have to do some :WaitForChild() action, i.e.

--workspace is a constant when compared to game.Workspace
workspace:WaitForChild("Square"):WaitForChild("Cigar").Transparency = 0

also processing purchases on the client i.e. exclusively localscripts is not a good idea in my opinion

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