So im trying to make a "Save Blocks" Script, but i came across this problem.
when I run the script/press the button, inside Player, theres a Value called Save and in Save theres a Value Called Part, and inside Part theres a Value called pos, but pos has no value, so im gessing that .Value = ""..part.Position.."" is wrong. Can someone explain why it wont work?
local Gui = script.Parent
local Player = Gui.Parent.Parent.Parent
local Char = Player.Character
local part = game.Workspace:FindFirstChild("Part")
function onClicked()
local save = Instance.new("StringValue", Player)
save.Name = "Save"
while true do
wait()
if part ~= nil then
local savepart = Instance.new("StringValue", save)
savepart.Name = "Part"
local savepartpos = Instance.new("StringValue", savepart)
savepartpos.Name = "pos"
savepartpos.Value = ""..part.Position..""
local savepartrot = Instance.new("StringValue", savepart)
savepartrot.Name = "rot"
savepartrot.Value = ""..part.Rotation..""
local savepartsize = Instance.new("StringValue", savepart)
savepartsize.Name = "size"
savepartsize.Value = ""..part.Size..""
part:remove()
end
end
end
Gui.MouseButton1Click:connect(onClicked)

1 comment
o hey i think i found my problem.. I think i need to do X Y and Z seperatly