#does anyone know how to make it so when i get a leaderstat say Power and it goes up how do i make it

27 messages · Page 1 of 1 (latest)

verbal totem
#

leaderstats.Power.Value += 1?

deep prawn
#

i didnt know it cut off its supposed to say

#

grow

#

at the end

silk current
#

Do you have any tool or something you click to gain power? @deep prawn

deep prawn
#

yeah

indigo quarryBOT
#

studio** You are now Level 4! **studio

deep prawn
#

its a drink

#

and when you drink it gives power

silk current
#

then you should do this (give me a sec)

deep prawn
#

kk ty

silk current
#
  1. Add a Folder into Replicated Storage and name it RemoteEvents

  2. Add a Remote Event into the Folder and name it GivePowerRE

  3. Add a LocalScript into the tool and name it AddPowerScript

  4. paste this into the LocalScript:

-- Tool
local tool = script.Parent
-- Remote Event
local rs = game:GetService("ReplicatedStorage")
local folder = rs:WaitForChild("RemoteEvents") -- If you rename the folder put the new Folder name into the brackets
local re = folder:WaitForChild("GivePowerRe") -- If you rename the Remote Event put the new Remote Event name into the brackets

tool.Activated:Connect(function()
   re:FireServer()
end)
  1. Add A Script into ServerScriptService and name it AddPowerScript[Server]
  2. Paste this into the Script
-- Remote Event
local rs = game:GetService("ReplicatedStorage")
local folder = rs:WaitForChild("RemoteEvents") -- If you rename the folder put the new Folder name into the brackets
local re = folder:WaitForChild("GivePowerRe") -- If you rename the Remote Event put the new Remote Event name into the brackets

re.OnServerEvent:Connect(function(player)
   player.leaderstats.Power.Value += 1
end)
  1. Now test this system with OPENED OUTPUT
  2. if any errors occur please tag me here @deep prawn
deep prawn
#

kk let me try it

#

yes it works but i want it to make my character grow in size when the power goes up

#

i still stay same size

#

but i didnt get an error

#

@silk current

silk current
#

I'm not too sure about that one, will try to look into it and find something that could help :)

deep prawn
#

kk ty

#

i tried making to grow before

#

but it failed

#

i tried taking apart a lifting simualtor script what makes you grow in size and just change the stats to power and try to put it in my tool

#

but it made you default r15 size

#

but didnt make you grow

silk current
#

You can read about resizing the player here: https://devforum.roblox.com/t/shrinkingchanging-player-size-with-a-script/545273

I would say all you need to do is add

-- Remote Event
local rs = game:GetService("ReplicatedStorage")
local folder = rs:WaitForChild("RemoteEvents") -- If you rename the folder put the new Folder name into the brackets
local re = folder:WaitForChild("GivePowerRe") -- If you rename the Remote Event put the new Remote Event name into the brackets

re.OnServerEvent:Connect(function(player)
   player.leaderstats.Power.Value += 1
    
    local char = player.Character or player.CharacterAdded:Wait()
    local Humanoid = char:WaitForChild("Humanoid")
    Humanoid.HeadScale += 1
    Humanoid.BodyDepthScale += 1
    Humanoid.BodyWidthScale += 1
    Humanoid.BodyHeightScale += 1
end)
#

But I'm not sure as I never tried to do this

#

oh wait I didn't specify humanoid sorry