I have this script:
local c = nil
local sB = script.Parent.SetButton
local rB = script.Parent.RemoveButton
local char = game.Players.LocalPlayer.Character
sB.MouseButton1Click:connect(function()
c = char.Torso.CFrame
if(char.LocalBin:FindFirstChild("WaypointMarker")) then char.LocalBin.WaypointMarker:Destroy() end
m = game.Lighting.WaypointMarker:Clone()
m.CFrame = c
m.Parent = char.LocalBin
end)
rB.MouseButton1Click:connect(function()
char.LocalBin.WaypointMarker:Destroy()
end)
Just to clarify the waypoint marker is a Part with a Script inside it that makes it spin, also sB and rB are text buttons. What it does is once you click the button it clones the Part to your Torso and then once you click the second button it removes it. If you click the second button twice it removes the first Part. This works fine in Studio but the Part doesn't show up in the actual game. At the moment you can test it here.

5 comments
Also, Ingame, Press F9 to view debug console to see if it prints any errors.
It is a Gui -_-
You mentioned that it is a part..
No, I mentioned that the WaypointMarker is a part, I'm not calling MouseButton1Click on WaypointMarker
There we go, that should work(edited answer)