I've made a script using the onChatted function, however, the output says:
Script6: '=' expected near 'onChatted'.
So I decided to (yet again) turn to this community. I'll convert it to ROBLOX and test it there, even though it will have different methods.
[lua]npc = create("NPC")
label = create("Label")
print("Loaded Cloning Script")
--[[ function onChatted(msg) ]]--
if msg == "/clone" then
print("Cloning " .. speaker.Name)
npc.Parent = game.World
npc.Name = speaker.Name
label.Parent = npc
label.Text = speaker.Name .. "'s Clone"
npc.Skin = speaker.Character.Skin
print(speaker.Name .. " was successfully cloned.")
else
print(speaker.Name .. "was insuccessfully cloned.")
end
end
link(Player.Chatted, onChatted)[/lua]
Script6: '=' expected near 'onChatted'.
So I decided to (yet again) turn to this community. I'll convert it to ROBLOX and test it there, even though it will have different methods.
[lua]npc = create("NPC")
label = create("Label")
print("Loaded Cloning Script")
--[[ function onChatted(msg) ]]--
if msg == "/clone" then
print("Cloning " .. speaker.Name)
npc.Parent = game.World
npc.Name = speaker.Name
label.Parent = npc
label.Text = speaker.Name .. "'s Clone"
npc.Skin = speaker.Character.Skin
print(speaker.Name .. " was successfully cloned.")
else
print(speaker.Name .. "was insuccessfully cloned.")
end
end
link(Player.Chatted, onChatted)[/lua]
All my mods are available here.