#Viewmodel not appearing
58 messages · Page 1 of 1 (latest)
Here's the clip regarding this
Watch Viewmodel not appearing (Sorry for poo poo video quality, I have a potato laptop) and millions of other Roblox Studio videos on Medal, the largest Game Clip Platform.
try adding a .Name to this
since ur trying to find an instance from an instance not a string
so like
loadSlot(framework.inventory.Name[1]) or...
no
framework.inventory[1].Name
also it should be "1"
like ["1"]
wait
no
its a table
i see
?
er.. im pretty new about all of this so what is that suppose to mean?
example:
print("1")
if blah blah then
print("2")
end
--and on and on
so i just make another script and try to type that over and over or smth?
** You are now Level 1! **
aight
`
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local camera = game.Workspace.CurrentCamera
local framework = {
inventory = {
"M92A5";
"RTP .45";
"Combat Dagger";
"Bobm";
};
module = nil;
viewmodel = nil;
}
function loadSlot(Item)
local viewmodelFolder = game.ReplicatedStorage.Viewmodels.M92A5
local moduleFolder = game.ReplicatedStorage.Modules.M92A5
if moduleFolder:FindFirstChild(Item) then
framework.module = require(moduleFolder:FindFirstChild(Item))
if viewmodelFolder:FindFirstChild(Item) then
framework.viewmodel = viewmodelFolder:FindFirstChild(Item):Clone()
framework.viewmodel.Parent = camera
end
end
end
RunService.RenderStepped:Connect(function()
for i, v in pairs(camera:GetChildren()) do
if v:IsA("Model") then
v:PivotTo(camera.CFrame)
end
end
end)
loadSlot(framework.inventory[1])
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local UserInputService = game:GetService("UserInputService")
local RunService = game:GetService("RunService")
local camera = game.Workspace.CurrentCamera
local framework = {
inventory = {
"M92A5";
"RTP .45";
"Combat Dagger";
"Bobm";
};
module = nil;
viewmodel = nil;
}
function loadSlot(Item)
local viewmodelFolder = game.ReplicatedStorage.Viewmodels
local moduleFolder = game.ReplicatedStorage.Modules
if moduleFolder:FindFirstChild(Item) then
framework.module = require(moduleFolder:FindFirstChild(Item))
if viewmodelFolder:FindFirstChild(Item) then
framework.viewmodel = viewmodelFolder:FindFirstChild(Item):Clone()
framework.viewmodel.Parent = camera
end
end
end
RunService.RenderStepped:Connect(function()
for i, v in pairs(camera:GetChildren()) do
if v:IsA("Model") then
v:PivotTo(camera.CFrame)
end
end
end)
loadSlot(framework.inventory[1])
there u go
i just realized u had the folders set to a specific gun
mark it as solved
just a viewmodel
for an FPS game im trying to make for fun
A view model?
yea
Idk what that is
its solved anyways
Still I wanna see
watch FPS tutorial by Xeradev from part 1 if ya wanna check
viewmodels are u holding the weapon in first person u see in games
Ohhh
yep