Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

help im making a stun move but to test it i need it to say hi but it is NOT printing "hi"! Help me?

Asked by
Tizzel40 243 Moderation Voter
6 years ago

ok so when c a blue ball should appear

-the balls name is ROOM -the ball is anchored it is true -and of course its cancollide is false

so when you press the C Key a ball should apper in your leftupperarm and the circle will grow

and anyone who touches it EXCEPT ME will have their humanoid root part anchored equal to true so when in the air they get frozen and their walkspeed should be 0 but after 4 seconds they should be back to normal

in the script below it shows you

local use = false
game.Workspace.OpeFired.OnServerEvent:Connect(function(play)



    local char = play.Character or play.CharacterAdedd:Wait()
    local hum = char:WaitForChild("Humanoid")
local rom = game.ReplicatedStorage.ROOM:Clone() --this parts cancollide is false and the anchored == true
--local romwave = game.ReplicatedStorage.ROOMWAVE:Clone()
    --gumam.Orientation = Vector3.new(0,3,0)
        rom.Parent = game.Workspace
        rom.CFrame = play.Character.LeftUpperArm.CFrame
        --romwave.Parent = game.Workspace
        --romwave.CFrame = play.Character.LeftUpperArm.CFrame
        --romwave.Orientation = Vector3.new(-90,0,0)

        rom.Conquers:Play()

rom.Touched:Connect(function(hit)
            local ehum = hit and hit.Parent:FindFirstChild("Humanoid")
            if ehum and ehum ~= hum and use == false then
            use = true
            print("hi")

            hit.Parent.HumanoidRootPart.Anchored = true
            hit.Parent.Humanoid.WalkSpeed = 0 
            wait(4)
            hit.Parent.Humanoid.WalkSpeed = 16

                hit.Parent.HumanoidRootPart.Anchored = true

                  end

            end)





        for i = 1,20 do
            wait(.01)
            rom.Size = rom.Size + Vector3.new(1.2,1.2,1.2)
            --romwave.Size = romwave.Size + Vector3.new(1.5,0,1.5)
        end

        for i = 1,25 do
            wait(.4)
            rom.Size = rom.Size + Vector3.new(1.2,1.2,1.2)
            --romwave.Size = romwave.Size + Vector3.new(5.5,0,.5)
        end

        wait(1.5)
        for i = 1,50 do
            wait(.01)
            rom.Size = rom.Size - Vector3.new(1.2,1.2,1.2)
            --romwave.Size = romwave.Size + Vector3.new(2,0,2)
         end

        wait(1)
        rom:Destroy()
end)

but its supposed to say "hi when a humanoid (not your humanoid) is hit tell me why its not printing hi??

2 answers

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

The reason its not printing "hi" is because your script isnt even entering the event:

rom.Touched:Connect(function(hit)

So "rom" isnt getting touched.

0
on line 19 it say that... Tizzel40 243 — 6y
0
Yeah, i know, im telling you what event the script isnt going into, im not just going to give you a full script because you wont learn the debugging proccess. Le_JuiceBOX 54 — 6y
Ad
Log in to vote
0
Answered by
Oficcer_F 207 Moderation Voter
6 years ago
Edited 6 years ago

You cannot have 2 "and" logical operators I think.

0
? Tizzel40 243 — 6y
0
? Oficcer_F 207 — 6y
0
Oh, I wrote wrong... Oficcer_F 207 — 6y

Answer this question