So this script is suppose to spawn In one of my models when the player says something, but It's not working and I get no errors. It's in a local script.
local player = game.Players.LocalPlayer
local hum = player.Character:WaitForChild("Humanoid")
local pentagram = script.Parent
local spell = "Hello"
player.Chatted:connect(function(message)
if string.lower(message) == string.lower(spell) then
wait(5)
local crystal = game:GetService("InsertService"):LoadAsset(278749111)
crystal.Parent = game.Workspace
crystal.Position = pentagram.Position --[[+ Vector3.new(0,5,0)]]--
crystal.Transparency = 1
wait(0.1)
crystal.Transparency = 0.9
wait(0.1)
crystal.Transparency = 0.8
wait(0.1)
crystal.Transparency = 0.7
wait(0.1)
crystal.Transparency = 0.6
wait(0.1)
crystal.Transparency = 0.5
wait(0.1)
crystal.Transparency = 0.4
wait(0.1)
crystal.Transparency = 0.3
wait(0.1)
crystal.Transparency = 0.2
wait(0.1)
crystal.Transparency = 0.1
wait(0.1)
crystal.Transparency = 0
end
end)

2 comments
I am using character I just deleted the code for testing purposes.
Still doesn't work.