Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

false Trying to call method on object of type: `Script` with incorrect arguments?

Asked by 6 years ago
Edited 6 years ago

Hey! So i'm trying to use a very short and simple talky script for a spell system i'm working on, and i'm trying to move and old system over to a module. Now My problem right now is that for some reason it wont call the script. its just not working i dunno why! I keep getting this error

false Trying to call method on object of type: Script with incorrect arguments.

Can anyone help!

01local wand = script.Parent
02print("Found Wand")
03 
04local Mag = require(game.SeverScriptService.MagicModule)
05print("Found Magic")
06 
07 
08 
09 
10game.Players.PlayerAdded:connect(function(player)
11       if player.Name == wand.Parent.Name then
12    player.Chatted:connect(function(msg)
13        if msg == "Orlora" --What thing we need to chat to run the script
14        then print("Orlora")
15        wand.CurrentSpell.Value = "Orlora"
View all 21 lines...

Module

001------------------------------Normal Spell Casting----------------------------------------------------------
002 
003 
004function CastSpell()
005 
006if Mode.Value == "Orlora" then
007 
008 
009wand.Activated:wait()
010 
011script.Disabled = false
012local c = wand.Parent.Humanoid:LoadAnimation(Magic.Animations.SummonSmoke1)
013c:play()
014 
015local r = ArchFolder.Architype:Clone()
View all 121 lines...
0
Its a simple script that leads to a much longer module that i cant complete until i get this sucker working! Manelin 2 — 6y
0
What does the ModuleScript look like? (just the part where you create the CastSpell function and return it) mattscy 3725 — 6y
0
I have added the module Manelin 2 — 6y

Answer this question