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

How do i put a position value from a string into my script? I'm having trouble!

I'm trying to move a part to different positions that are out into the string value. Basically on click, the parts position is taken from the string value and will make the part move.

Here's the script:

local location = script.Parent.Parent.Parent.Parent.Parent.TardisScreen.Screen.SurfaceGui.LocationFrame.Location

local function click()	
	local startCFrame = CFrame.new(location.Value)
	local model = game.Workspace.DefaultExterior

	model.PrimaryPart = game.Workspace.DefaultExterior.BasePart
	wait(0.1)
	model:SetPrimaryPartCFrame(startCFrame)
end

script.Parent.Lever.Use.MouseClick:Connect(click)

Any help is appreciated :)

1 answer

I think you need to mark the position where you want the part to move.

1 comment

0

I have done this through a string that a has the position inside of it.

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