|
| 08 Aug 2016 08:37 PM |
local Player = script.Parent.Parent.Parent.Parent.Parent local DataStore = game:GetService("DataStoreService") local DS1 = DataStore:GetDataStore("BuildData") local Builds = game.workspace.ActiveParts:FindFirstChild(Player.Name.. "'s parts") local Key = "Player_"..Player.UserId
script.Parent.MouseButton1Click:connect(function()
script.Parent.ClickSound:Play()
script.Parent.Parent.Parent.BuildData.LocalScript.Disabled = true script.Parent.ClickSound:Play()
if Builds then DS1:SetAsync(Key, Builds) end
print("[DataStore] Sucessfully saved the build data from/to "..Key..".")--Player's Name is important!
script.Parent.Parent:TweenPosition(UDim2.new(0,325,0,-2000),"In","Quart",0.5) script.Parent.Parent.Parent.BuildingData:TweenPosition(UDim2.new(0,325,0,-2000),"In","Quart",0.5) script.Parent.Parent.Parent.BuildData.LocalScript.Disabled = false end)
Did I do this correctly? It's supposed to be a script that saves the player's build. There were no errors in the output when I press the button. |
|
|
| Report Abuse |
|