How do I spawn a model when the player chats?
Please make your question title relevant to your question content. It should be a one-sentence summary in question form.
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.
01 | local player = game.Players.LocalPlayer |
02 | local hum = player.Character:WaitForChild( "Humanoid" ) |
03 | local pentagram = script.Parent |
07 | player.Chatted:connect( function (message) |
08 | if string.lower(message) = = string.lower(spell) then |
10 | local crystal = game:GetService( "InsertService" ):LoadAsset( 278749111 ) |
11 | crystal.Parent = game.Workspace |
12 | crystal.Position = pentagram.Position |
15 | crystal.Transparency = 0.9 |
17 | crystal.Transparency = 0.8 |
19 | crystal.Transparency = 0.7 |
21 | crystal.Transparency = 0.6 |
23 | crystal.Transparency = 0.5 |
25 | crystal.Transparency = 0.4 |
27 | crystal.Transparency = 0.3 |
29 | crystal.Transparency = 0.2 |
31 | crystal.Transparency = 0.1 |
33 | crystal.Transparency = 0 |