#Isnt giving Strength

1 messages · Page 1 of 1 (latest)

pallid wagon
#

Im trying to make Strength and for the past few hours when ever I buy a dumbell it wont give me stregth and I dont know how to fix it

dawn niche
#

Oh

#

As I see

#

You are doing the code into a local script

#

Its not going to work, because Tool.Activated is client

#

So, you could use Players.LocalPlayer instead of Players:GetPlayerFromCharacter()

#

And, btw, for security reasons, you should not copy and paste the same script into a local.
Like this, players could easily exploit

chilly waveBOT
#

studio** You are now Level 6! **studio

dawn niche
#

For example, giving themselves 10000 strength.
So I reccomend you to use a script on server script service, which receives the info of a event that has been fired by the client and give the player strength, so they can't cheat.

pallid wagon
dawn niche
#

No

#

Change for client, but with verification on the server

pallid wagon
#

Client?

dull yarrow
#

Client script

pallid wagon
#

How do I change it

#

Wait what am I changing to client

dull yarrow
#

The Dumbell Scripts

#

then make a remoteevent in replicatedstorage

pallid wagon
dull yarrow
pallid wagon
#

Oh wow that open shop

dull yarrow
#

and just do
local StrengthGiver = game.ReplicatedStorage:WaitForChild("StrengthGiver")
local strength = 1

StrengthGiver:FireServer(strength)

pallid wagon
#

Wait how does it know how many to give

#

There we go

#

So what should the remote be

dull yarrow
pallid wagon
#

Like what should it be called

dull yarrow
#

I guess StrengthGiver

#

or something like that

pallid wagon
#

K