Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

why wont alvinblox's tutorial go through?

Asked by
xxaxxaz 42
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.

01local replicatedStorage = game:GetService("ReplicatedStorage")
02local remoteData = game:GetService("ServerStorage"):WaitForChild("RemoteData")
03 
04local cooldown = 1
05 
06replicatedStorage.Remotes.Lift.OnServerEvent:Connect(function(player)--this block is the error
07 
08    print("Fired")
09 
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")
View all 27 lines...
1local module = require(script.Parent:WaitForChild("ModuleScript"))
2local player = game.Players.LocalPlayer
3local mouse = player:GetMouse()
4 
5script.Parent.Activated:Connect(function()
6    module.Lift()
7end)
01local module = {}
02local replicatedStorage = game:GetService("ReplicatedStorage")
03 
04function module.Lift()
05 
06    replicatedStorage.Remotes.Lift:FireServer()
07 
08end
09 
10return module

leaderstats script

01local serverStorage = game:GetService("ServerStorage")
02 
03game.Players.PlayerAdded:Connect(function(player)
04 
05 
06    local leaderstats = Instance.new("Folder")
07    leaderstats.Name = "leaderstats"
08    leaderstats.Parent = player
09 
10    local strength = Instance.new("NumberValue")
11    strength.Name = "Strength"
12    strength.Parent = leaderstats
13 
14    local rebirths = Instance.new("IntValue")
15    rebirths.Name = "Rebirths"
View all 26 lines...
0
oops xxaxxaz 42 — 4y
0
wheres the error BulletproofVast 1033 — 4y
0
I am using alvinblox tutorial and there is not a error. the function just wont activate. xxaxxaz 42 — 4y
0
wheres the script that fires it 0: BulletproofVast 1033 — 4y
View all comments (22 more)
0
added the others xxaxxaz 42 — 4y
0
sorry I am new at scripting. so I am following alvinblox's tutorials witch are made to teach you. xxaxxaz 42 — 4y
0
and if ur using alvinblox's videos, you should probably go to the newer tutorials. BulletproofVast 1033 — 4y
0
I just looked at it and it says it was made about 3 years ago xxaxxaz 42 — 4y
0
if you put a print after "replicatedStorage.Remotes.Lift:FireServer()," will it print? BulletproofVast 1033 — 4y
0
no xxaxxaz 42 — 4y
0
wait I was looking at the wrong code xxaxxaz 42 — 4y
0
uh if u do while wait(1) do game.ReplicatedStorage.Remotes.Lift:FireServer() end in a local script in starter player scripts, will it fire? BulletproofVast 1033 — 4y
0
wot BulletproofVast 1033 — 4y
0
it is now printing but not doing  10:53:53.275 Got pass if statement - Server - Remotes:11   10:53:53.275 Got pass the Debounce Varible - Server - Remotes:13   10:53:54.286 Fired - Server - Remotes:8 xxaxxaz 42 — 4y
0
it is looping  10:53:53.275 Got pass if statement - Server - Remotes:11   10:53:53.275 Got pass the Debounce Varible - Server - Remotes:13   10:53:54.286 Fired - Server - Remotes:8 xxaxxaz 42 — 4y
0
not doing wot BulletproofVast 1033 — 4y
0
not getting past line 14? BulletproofVast 1033 — 4y
0
that means that is got pass the debounce value but not the leaderstats xxaxxaz 42 — 4y
0
it said 10:53:53.275 Got pass the Debounce Varible so it got pass line 14 just not 16 xxaxxaz 42 — 4y
0
does it print "got pass debounce if statement"? if it does send leaderstat script BulletproofVast 1033 — 4y
0
done xxaxxaz 42 — 4y
0
idk try if debounce.Value == false then BulletproofVast 1033 — 4y
0
ok nvm. so ur leaderstats are Strength and Rebirths. You need to capitalize Strength and Rebirths when adding it BulletproofVast 1033 — 4y
0
ok thx xxaxxaz 42 — 4y
0
  11:04:19.539 Fired - Server - Remotes:8   11:04:19.539 Got pass if statement - Server - Remotes:11   11:04:19.539 Got pass the Debounce Varible xxaxxaz 42 — 4y
0
look in answer. it easier to see. BulletproofVast 1033 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago
1-- this is what you did
2player.leaderstats.strength.Value = player.leaderstats.strength.Value + 25 * (player.leaderstats.rebirths.Value + 1)
3-- make sure strength is Strength. same with rebirths.
4player.leaderstats.Strength.Value += 25 * (player.leaderstats.Rebirths.Value + 1)
0
ohhhhhh. Thx this helps I thought you were talking about stats. thx! xxaxxaz 42 — 4y
0
uh it work now? BulletproofVast 1033 — 4y
0
and probably also find a way to fire in local script or just use a script and no event cos idk how use modules :-; BulletproofVast 1033 — 4y
0
wait no it auto does it xxaxxaz 42 — 4y
View all comments (4 more)
0
ye it fires every second. Probably make a local script in the tool and fire it when you use the tool. i not gud with tools ;-; BulletproofVast 1033 — 4y
0
and delete the local script with while wait(1) do cos dat make it fire every second BulletproofVast 1033 — 4y
0
ok, by the way it took a while for this respawnce because I was eating. xxaxxaz 42 — 4y
0
THX IT WORKS PERFECTLY NOW!!! WHEN I CLICK WITH THE ITEM IN MY HAND I GET 25+ STRENGTH AND THE COOLDOWN KEEPS ME FROM CLICKING UNDER A SECOND AFTERWORDS THANKS!!!!!!! xxaxxaz 42 — 4y
Ad

Answer this question