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

Workplace is not a valid member of the game?

Im making a simulator and i type in and etc. then i get this error:

Workplace is not a valid member of DataModel "Game"

here is my code:

game.Workplace.Shop.ShopPart.Touched:Connect(function(hit) if game.Players:GetPlayerFromCharacter(hit.Parent) then game.ReplicatedStorage.ShopGUI:FireClient(game.Players:GetPlayerFromCharacter(hit.Parent)) end end)

What am i doing wrong???

1 comment

0

Maybe you changed the name of the Workplace. You should use the global variable "workspace" e.g. workspace.Shop.ShopPart

1 answer

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