#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)
Do you have any tool or something you click to gain power? @deep prawn
yeah
** You are now Level 4! **
then you should do this (give me a sec)
kk ty
-
Add a Folder into Replicated Storage and name it RemoteEvents
-
Add a Remote Event into the Folder and name it GivePowerRE
-
Add a LocalScript into the tool and name it AddPowerScript
-
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)
- Add A Script into ServerScriptService and name it AddPowerScript[Server]
- 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)
- Now test this system with OPENED OUTPUT
- if any errors occur please tag me here @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
I'm not too sure about that one, will try to look into it and find something that could help :)
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
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)
Hi there,my name is Leon and I am very new at scripting,I have been trying to change a player’s size when they touch a part with any of their body parts. I have tried looking for videos for this,but I can’t seem to find them,if you could help me I would highly appreciate it! My discord is: leon jeminaj#5916
But I'm not sure as I never tried to do this
oh wait I didn't specify humanoid sorry