#How can I make the speed value 0.1 walking speed? (düzenlendi)
7 messages · Page 1 of 1 (latest)
Value3.Value = 0.1
Player.Character.Humanoid.WalkSpeed = Value3.Value
like this?
local DataStore = game:GetService("DataStoreService")
local ds = DataStore:GetDataStore("ExampleSave")
game.Players.PlayerAdded:Connect(function(Player)
if not Player:FindFirstChild("leaderstats") then
local Folder = Instance.new("Folder" ,Player)
Folder.Name = "leaderstats"
end
local Folder = Player:WaitForChild("leaderstats" ,5)
local Value1 = Instance.new("IntValue",Folder)
local Value2 = Instance.new("IntValue",Folder)
local Value3 = Instance.new("IntValue",Folder)
Value3.Name = "Speed"
Value1.Name = "Wins"
Value2.Name = "Rebirths"
local GetData = ds:GetAsync(Player.UserId)
if GetData ~= nil then
Value1.Value = GetData[1]
Value2.Value = GetData[2]
Value3.Value = GetData[3]
else
Value1.Value = 0
Value2.Value = 0
Value3.Value = 0.1
Player.Character.Humanoid.WalkSpeed = Value3.Value
end
end)
game.Players.PlayerRemoving:Connect(function(Player)
local SaveData = {}
for _,Child in pairs(Player.leaderstats:GetChildren())do
table.insert(SaveData,Child.Value)
end
ds:SetAsync(Player.UserId, SaveData)
end)
but this not work
because I didn't send you the correct version, I sent it in a way that you can understand, I think your lua knowledge is lacking