Hi everyone so I’m currently working on an ability System and rn I want to let the player get smaller and faster for 5 seconds and there should be a cooldown of 10 seconds does anyone know how I can do this?
1 Like
you can modify the scale values of the character inside the humanoid in a script, and it should resize the player
1 Like
Developer fourum isn’t for people making scripts for you. You should search up your question first.
1 Like
ye you can do it really easily u just have to communicate between server and client with a remote event and just change the properties of your character and humanoid
u will need a tool , remote event, a normal/server script and a local script.
make sure to turn off require handle property if your tool doesn’t have a handle.
if u don’t wanna use a tool use UserInputService.
you can take this as an example for making the tool
--This is the local script.
local Tool = script.Parent
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ToolRemote = ReplicatedStorage:WaitForChild("ToolRemote")
local debounce = false
local cd = 10
Tool.Activated:Connect(function()
if not debounce then
debounce = true
ToolRemote:FireServer()
task.wait(cd)
debounce = false
end
end)
--now the server script
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ToolRemote = ReplicatedStorage.ToolRemote
ToolRemote.OnServerEvent:Connect(function(Player)
local Character = Player.Character or Player.CharacterAdded:Wait()
local Humanoid = Character.Humanoid
Humanoid.WalkSpeed = Humanoid.WalkSpeed * 3 -- adjust how u want 16 is default
--set size ( i currently dont know a good way)--
task.wait(5) -- the wait on the server is not that accurate but it works
Humanoid.WalkSpeed = 16
--set size--
end)
1 Like
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.