Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Workplace is not a valid member of the game?

Asked by 2 years ago

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???

0
Maybe you changed the name of the Workplace. You should use the global variable "workspace" e.g. workspace.Shop.ShopPart MarkedTomato 810 — 2y

1 answer

Log in to vote
0
Answered by 2 years ago

workspace not "Workplace"

Ad

Answer this question