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

Chatted Script trouble!? [UPDATED] V3

function admin (msg)
	Player = script.Parent.Parent
	if Player.Name == "iispear" then
		if msg == "HSoulDrop" then
			pp = game.Lighting.Union:Clone()
			Weld = Instance.new("Weld") 
Weld.Part0 = pp.Character.Torso 
Weld.Part1 = pp
Weld.Parent = pp.Character.Torso 
Weld.C0 = CFrame.new(0, 5, 5)*CFrame.fromEulerAnglesXYZ(0, 0, 0)

`
			
		end
		
	end
end

This isn't working i want it when someone chats HSoulDrop a Union in lightning is cloned and put infront of the character . I've tried over and over! whenever i chat "HSoulDrop" in game the script never runs i think it gets messed up during the welding and positioning part how do i get the script to clone a union in lighting when you chat HSoulDrop and position it in front of you ?

(btw You cant,Run this script in test beacuse you cant use chat in test.

Ok this is when i updatated it with Yum's advice

function Admin (msg)
	Player = script.Parent.Parent
	if Player.Name == "iispear" then
		if msg == "HSoulDrop" then
			pp = game.Lighting.Union:Clone()
			Weld = Instance.new("Weld") 
Weld.Part0 = pp.Character.Torso 
Weld.Part1 = pp
Weld.Parent = pp.Character.Torso 
Weld.C0 = CFrame.new(0, 5, 5)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
			
		end
		
	end
end 

script.Parent.Parent.Chatted:connect(Admin)

i called it but still wont work i have a really bad feeling its CFrame or the weld

More advice from Yoshi

function Admin (msg)
	Player = script.Parent.Parent
	if Player.Name == "iispear" then
		if msg == "HSoulDrop" then
			pp = game.Lighting.Union:Clone()
			Weld = Instance.new("Weld") 
Weld.Part0 = pp.Character.Torso 
Weld.Part1 = pp
Weld.Parent = pp.Character.Torso 
Weld.C0 = CFrame.new(0, 5, 5)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
			
		end
		
	end
end 

Player.Chatted:connect(Admin)

still wont work Help! Thanks to all The contributed

8 comments

0

Yes you can test Message function on Studio.

0

Thanks! I never knew but i really dont know how to fix it.

0

Did you ever call the function?

0

i just saw that how would i call it i dont wanna make a mistake

0

Check the new script still wont work. Yum

0

Where did you put the script in the game? Also instead of script.Parent.Parent.Chatted you can replace it with Player.Chatted.

0

i left the script in workspace union in lighting

0

Daang. I can help you with this in a few hours, since I'm in school

2 answers

Try this

Character = Plr.Character

game.Players.PlayerAdded:connect(function(Plr)
plr.Chatted:connect(function(msg)
if Plr.name == "iispear" and msg == "HSoulDrop" then
p = game.Lighting.Union:Clone()
Weld = Instance.new("Weld", Character.Torso)
Weld.Part0 = Character.Torso
Weld.Part1 = p
Weld.C0 = CFrame.new(0, 5, 5)*CFrame.fromEulerAnglesXYZ(0, 0, 0)
end
end)
end)

Tell me if it works.

1 comment

0

Please provide explanation with your script.

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