Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

2 comments

0

on line 19 it say that...

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.