#help me

126 messages · Page 1 of 1 (latest)

bleak crater
#

a guy sended a new script with some differences, but it didnt helped too much

simple mirage
#

Change the "speed =" at the bottom to something like speed2

#

Also change the "=speed" to the new variable

bleak crater
#

at the bottom

simple mirage
#

Lemme rewrite your code

bleak crater
#

ok

simple mirage
#

local part = script.Parent
local player = game.Players.LocalPlayer
local character = player.Character
local speed = character.Humanoid.WalkSpeed
local speedvar = 100

part.Anchored = true

part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
speed2 = speed + speedvar * 10
character.Humanoid.WalkSpeed = speed2
end
end)

bleak crater
simple mirage
#

try it out

bleak crater
#

ok

#

testing rn

#

didnt worked too

simple mirage
#

strange

#

lemme double check your scipt

bleak crater
#

the script is a normal script in the Part that its in the Workspace

#

is this right?

simple mirage
#

yeah that right

verbal crestBOT
#

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

simple mirage
#

OH

#

I THINK I KNOW

#

local part = script.Parent
local character = player.Character
local speed = character.Humanoid.WalkSpeed
local speedvar = 100

part.Anchored = true

part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
speed2 = speed + speedvar * 10
character.Humanoid.WalkSpeed = speed2
end
end)

#

Try that

#

Did it work?

bleak crater
#

not working too

simple mirage
#

Hm lemme see

#

wait

#

are there any logs

#

like errors showing up

#

If there are send me a pic

bleak crater
#

only that

simple mirage
#

AH

bleak crater
#

but i already saw it on another scripts o'mine that are working

simple mirage
#

That's the issue

bleak crater
#

idk what this means

simple mirage
#

local part = script.Parent
local character = player
local speed = character.Humanoid.WalkSpeed
local speedvar = 100

part.Anchored = true

part.Touched:Connect(function(hit)
local player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player then
speed2 = speed + speedvar * 10
character.Humanoid.WalkSpeed = speed2
end
end)

#

try that

#

this should work 100%

bleak crater
#

not again

simple mirage
#

breh

#

lets see

#

Ah

#

wait

#

don't use that

bleak crater
#

k

simple mirage
#

breh

#

one sec

#

local part = script.Parent
local character = player
local speed = Humanoid.WalkSpeed local speedvar = 100
part.Anchored = true. part.Touched:Connect(function(hit)
local Humanoid = hit.Parent:FindFirstChild("Humanoid") 
if Humanoid then
speed2 = speed + speedvar * 10 Humanoid.WalkSpeed = speed2
end
end)

#

try that

#

anything?

bleak crater
#

trying rn

#

not again

simple mirage
#

what error

bleak crater
#

i can fix this

#

i think

#

ye lol

simple mirage
#

OH

bleak crater
#

anyway lemme try again

simple mirage
#

just remove the period from part.anchored = true

#

my bad

bleak crater
#

ye i've done that

#

nahhhhh

#

wait a sec

simple mirage
#

?

bleak crater
#

i removed the dot while the game was running

simple mirage
#

oh lol

bleak crater
waxen socket
#

make a check like

#

if hit.Parent:FindFirstChild("Humanoid") then

simple mirage
#

I added that xd

waxen socket
#

its getting confused as it thinks you are trying to find the humanoid inside a random part

waxen socket
#

u made a variable for it

bleak crater
#

already done that too

#

lemme get my code

waxen socket
#

send ur latest code

bleak crater
#
local part = script.Parent
local speedVar = 100

part.Touched:Connect(function(hit)
    local hum = hit:FindFirstChild('Humanoid')
    if hum then
        local speed = speed + speedvar * 10
        hum.WalkSpeed = speed
    end
end)
#

didnt worked aswell

waxen socket
#

no

#

ill write out a new one hold on

simple mirage
#

change variables

waxen socket
#
local part = script.Parent
local speedVar = 100

part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then

        local hum = hit.Parent.Humanoid
        local speed = speed + speedvar * 10
        hum.WalkSpeed = speed
    end
end)
#

try that

simple mirage
#

bro copy and pasted his

#

lmao

bleak crater
#

not worked

waxen socket
#

but i got further than cryos script

simple mirage
#

local part = script.Parent
local speedVar = 100

part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then

    local hum = hit.Parent.Humanoid
    local speed2 = speed + speedvar * 10
    hum.WalkSpeed = speed2
end

end)

waxen socket
#

so its obviously something with the maths

bleak crater
#

ye

simple mirage
#

add local speed = whatever number here

waxen socket
#

also whats the point in doing speed

simple mirage
#

on top

waxen socket
#

so it stacks

#

like is the multiplying necessary

simple mirage
#

local part = script.Parent
local speedVar = 100

part.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild("Humanoid") then

    local hum = hit.Parent.Humanoid
    local speed = speedvar * 10
    hum.WalkSpeed = speed
end

end)

#

Try this one

bleak crater
#

i did it

simple mirage
#

it worked?

bleak crater
#

ye

simple mirage
#

which one

bleak crater
#

uh

simple mirage
#

epic

bleak crater
#

thanks u both @simple mirage @waxen socket

simple mirage
#

the issue I found with it was how you put speed = speed

waxen socket
#

yeah when i look at that more actually

#

it was like

#

saying 16 = 16 + newspeed x 10

#

kinda goofy

simple mirage
#

ye

bleak crater
#

anyway

#

im learning and this means a lot to me, i'll try to understand each piece of the code

#

ty

waxen socket
#

np just make sure not to reference anything u dont know is there

bleak crater
#

k

waxen socket
#

for example dont make a variable for the potential character like

#

hum = hit.Parent.Humanoid

#

u need to check if it is there first

bleak crater
#

ok