**What do you want to achieve?**If Player Click then
Part.Position = Player
And If TypePart == “Smolle” then
Past.Size = Vector3.new(1,1,1)
{My Model Script In ServerScriptServise, And Normal Script to}
What is the issue? Module Script
local module = {}
function CreatingPart(Player: Player, TypePart: "Smolle" | "Medium" | "Big")
local Part = Instance.new("Part", workspace)
Part.Position = Player
if TypePart == "Smolle" then
Part.Size = Vector3.new(1,1,1)
elseif TypePart == "Medium" then
Part.Size = Vector3.new(3,3,3)
elseif TypePart == "Big" then
Part.Size = Vector3.new(6,6,6)
end
end
return module
Normal Script
local ServerScriptService = game:GetService("ServerScriptService")
local Click = workspace.Click
local ModuleScript = require(ServerScriptService.ModuleScript)
Click.ClickDetector.MouseClick:Connect(function(Player)
ModuleScript.CreatingPart(Player, "Smolle")
end)
What solutions have you tried so far? I try see in youtobe But its problem not see in youtobe
You have to have the CreatingPart function be a part of the module table, so that it can be accessed by the requiring script:
local module = {}
module.CreatingPart = function(Player: Player, TypePart: "Smolle" | "Medium" | "Big")
local Part = Instance.new("Part", workspace)
Part.Position = Player
if TypePart == "Smolle" then
Part.Size = Vector3.new(1,1,1)
elseif TypePart == "Medium" then
Part.Size = Vector3.new(3,3,3)
elseif TypePart == "Big" then
Part.Size = Vector3.new(6,6,6)
end
end
return module
Oh I see why now.
In the module script, it is called CreatingPart, but in the server script it is called CreatingMap.
Change the server script line from