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

Part1 is not a valid member of Workspace "Workspace"?

Part1 is inside my Workspace, but I don't know why it can't find it or whatever.

Trying to make a 3d Shop.

Code:

local part = game.Workspace["Shop Pad"].OpenShop

part.Touched:Connect(function(hit)
	local player = game.Players:GetPlayerFromCharacter(hit.Parent)
	if player then
		local cam = workspace.CurrentCamera
		local  Part1 = game.Workspace.Part1
		local Stick = game.Workspace.Items.Stick
		
		cam.CameraType = "Scriptable"
		cam:Interpolate(Part1.CFrame, Stick.CFrame, 2)
	end
end)

1 comment

0

Make sure that 'game.Workspace.Part1' is anchored.

1 answer

Have you anchored it? Is the part's parent is a workspace? Try to use the following code instead:

local Part1 = workspace:FindFirstChild("Part1")

If it doesn't work please reply so I can think about how to fix it.

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