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

Whats the best way for a player.gui to get a cframe value out of a clickdetector?

so i made this system(or trying to) if u click a plot of land where a value is in a vector3 value it copys into the localplayer gui this wont work(is this cause of filtering and if it is how to fix it?

script.Parent.MouseClick:Connect(function()
	game.Players.LocalPlayer.Playergui.Gui.Location.Value =script.Parent.Parent.CFrameValue.Value
	
end)

This is also in a local script i wanted to make a grid system first but i found it too complex for me

1 answer

From what I can tell, you may be attempting to put a Vector3 as the value of a CFrameValue. The Value property of CFrameValue is meant to be of type CFrame, not type Vector3 so change Location.Value to be a CFrame. If you want the position, use CFrameValue.Value.p to get a Vector3 from it.

If this does not answer your question then I suggest updating your question to better explain what is happening and what you actually want.

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