why wont alvinblox's tutorial go through?
Asked by
4 years ago Edited 4 years ago
I am watching one of alvinblox's tutorials and I can not figure out what the problem is. I hear --that alvinblox's tutorials are out of date so that could be the problem. can anybody figure out why it will not go through my functions.
01 | local replicatedStorage = game:GetService( "ReplicatedStorage" ) |
02 | local remoteData = game:GetService( "ServerStorage" ):WaitForChild( "RemoteData" ) |
06 | replicatedStorage.Remotes.Lift.OnServerEvent:Connect( function (player) |
10 | if not remoteData:FindFirstChild(player.Name) then return "NoFolder" end |
11 | print ( "Got pass if statement" ) |
12 | local debounce = remoteData [ player.Name ] .Debounce |
13 | print ( "Got pass the Debounce Varible" ) |
14 | if not debounce.Value then |
15 | print ( "got pass debounce if statement" ) |
18 | player.leaderstats.strength.Value = player.leaderstats.strength.Value + 25 * (player.leaderstats.rebirths.Value + 1 ) |
19 | print ( "got pass leaderstats" ) |
22 | debounce.Value = false |
1 | local module = require(script.Parent:WaitForChild( "ModuleScript" )) |
2 | local player = game.Players.LocalPlayer |
3 | local mouse = player:GetMouse() |
5 | script.Parent.Activated:Connect( function () |
02 | local replicatedStorage = game:GetService( "ReplicatedStorage" ) |
06 | replicatedStorage.Remotes.Lift:FireServer() |
leaderstats script
01 | local serverStorage = game:GetService( "ServerStorage" ) |
03 | game.Players.PlayerAdded:Connect( function (player) |
06 | local leaderstats = Instance.new( "Folder" ) |
07 | leaderstats.Name = "leaderstats" |
08 | leaderstats.Parent = player |
10 | local strength = Instance.new( "NumberValue" ) |
11 | strength.Name = "Strength" |
12 | strength.Parent = leaderstats |
14 | local rebirths = Instance.new( "IntValue" ) |
15 | rebirths.Name = "Rebirths" |
16 | rebirths.Parent = leaderstats |
18 | local dataFolder = Instance.new( "Folder" ) |
19 | dataFolder.Name = player.Name |
20 | dataFolder.Parent = serverStorage.RemoteData |
22 | local debounce = Instance.new( "BoolValue" ) |
23 | debounce.Name = "Debounce" |
24 | debounce.Parent = dataFolder |