#is 364.0/s bad script preformace?

1 messages · Page 1 of 1 (latest)

chilly hawk
#

my game was lagging after I made a camera sway effect and I checked the script preformace and I dont know that is alot

#

ummm my game crashed

tame maple
#

im not the kind of person who knows about shit like this

#

but uhh

#

please optimize that singular local script

full raft
#

YES

#

I don’t even wanna know what you coded in there🙏

chilly hawk
#

I heard renderstepped is bad

#

but like how do I only use one?

full raft
#

You’re using multiple rendersteps?

chilly hawk
#

I have one renderstepped for the camera sway one for the camera head position and one for hiding the hed, one for playing animations

full raft
#

I don’t think renderstepped is bad

chilly hawk
#

oh ok

full raft
#

im not really sure but just thinking you can try putting the camera sway and everything into module scripts so you can run all the functions in one singular renderstepped function

#

That should definitely help

gleaming leaf
#

Send your code here so we can help

chilly hawk
#

beacuse thats hard scripting

gleaming leaf
#

Just take the code out of all three render steps and paste them into one

#

Or make all the connections a function instead and call those 3 functions from your render stepped connection

chilly hawk
#

local RS = game:GetService("RunService")
local Players = game:GetService("Players")

RS.RenderStepped:Connect(function()
local player = Players:WaitForChild("LocalPlayer")
local char = player:WaitForChild("Character")
local head = char:WaitForChild("Head")
local cam = workspace:WaitForChild("CurrentCamera")

cam.CFrame = head.CFrame * CFrame.new(0, 0.5, 0)

end)

-- More RenderStepped for realism
RS.RenderStepped:Connect(function()
local player = Players:WaitForChild("LocalPlayer")
local char = player:WaitForChild("Character")
local head = char:WaitForChild("Head")
local cam = workspace:WaitForChild("CurrentCamera")

cam.CFrame *= CFrame.Angles(math.sin(tick() * 5) * 0.01, 0, 0)

end)

RS.RenderStepped:Connect(function()
local player = Players:WaitForChild("LocalPlayer")
local char = player:WaitForChild("Character")
local head = char:WaitForChild("Head")
local cam = workspace:WaitForChild("CurrentCamera")

cam.CFrame *= CFrame.Angles(0, math.sin(tick() * 2) * 0.01, 0)

end)

RS.RenderStepped:Connect(function()
local player = Players:WaitForChild("LocalPlayer")
local char = player:WaitForChild("Character")
local head = char:WaitForChild("Head")
local cam = workspace:WaitForChild("CurrentCamera")

cam.CFrame *= CFrame.new(math.sin(tick()) * 0.05, math.cos(tick() * 2) * 0.02, 0)

end)

RS.RenderStepped:Connect(function()
local player = Players:WaitForChild("LocalPlayer")
local char = player:WaitForChild("Character")
local head = char:WaitForChild("Head")
local cam = workspace:WaitForChild("CurrentCamera")

for i = 1, 10000 do
    local _ = math.sqrt(i) * math.random()
end

end)

RS.RenderStepped:Connect(function()
local _ = Players:WaitForChild("LocalPlayer")
wait(0.001)
end)

chilly hawk
gleaming leaf
#

Wtf is that

#

First off

#

You have at least 2 syntax errors

#

2 of the render stepped functions don't do anything

#

And in one of them you're calculating a random number 1000 times per frame

#

Honestly

#

It might be time for a demotion to S0

#

That's the worst shit I've ever seen an S1 Cook up

wispy basalt
#

holy

#

😭

chilly hawk
#

so its like more fps

gleaming leaf
#

I'm 99% convinced this is a troll

formal hamlet
#

who even does game.Players:WaitForChild("LocalPlayer")

chilly hawk
#

isnt it like if the player takes long to join so you wait?

tame maple
#

definitely not going to change shit

tiny warren
bitter burrow
#

S1 thinking his him

formal hamlet
neon flint
#

also add task.wait() 😭

neon flint
formal hamlet
timid cobalt
#

dont be so mean lol he just asked a question

subtle plume
#

still ass

rustic garden
formal hamlet
#

Nvm

formal hamlet
#

or just 🏊

chilly hawk
#

tf I cause a whole ass war

sand zinc
#

Bro none of yall here helpful

#

S1 and yall clowning for bad scripts

#

In the same way yall tell people to go here for scripting help, how about you actually give them help

#

Hypocritical.. smh

#

Still need help? @chilly hawk

subtle plume
#

Know your Place

sand zinc
formal hamlet
#

im sorry but what the hell is s1 does this mean season 1 of scripting or theres scripting ranked

formal hamlet
sand zinc
sand zinc
sand zinc
wispy basalt
neon flint
#

s1s are so dumb nowadays

neon flint
#

we are not horses

#

we are humans

sand zinc
neon flint
#

smyw

#

gng

#

lowk

#

idk idc

sand zinc
neon flint
#

thx

sand zinc
#

ignore me

#

i care though

#

so i wont

sand zinc
#

do as you please

neon flint
#

but you're s1

sand zinc
#

and ur also s1

neon flint
#

s1 = noob, dumb and autistic

sand zinc
#

^

neon flint
sand zinc
#

🪞

neon flint
#

im scripter1

#

different things

sand zinc
sand zinc
sand zinc
#

then why didnt you help the guy in the forum?

neon flint
sand zinc
#

yall litrally just came here to llaugh at him

neon flint
#

that doesn't mean i need to help ppl

#

im a human

neon flint
#

i replied to other guy

sand zinc
sand zinc
sand zinc
neon flint
sand zinc
wispy basalt
sand zinc
#

well, at least you werent like

#

the rest

neon flint
#

where did you get this picture

wispy basalt
neon flint
#

hmm

wispy basalt
#

People who annoy you

sand zinc
#

Be careful

#

There's a staff in this forum

#

🫩

wispy basalt
#

Tho