the title says it all i need help with making viewmodel script thats gonna work with my current cas script. Here is the script:
local ContextActionService = game:GetService("ContextActionService")
local Player = game:FindFirstChild("Players").LocalPlayer
local Character = Player.Character or Player.CharacterAdded:Wait()
local humanoid = Character:WaitForChild("Humanoid")
local humanoidroot = Character:WaitForChild("HumanoidRootPart")
local Animator = humanoid:WaitForChild("Animator")
local idle = false
local equipped = false
local function FlashLight(actionName, inputState)
if actionName == "PressedFlashLight" and inputState == Enum.UserInputState.Begin then
if not idle then
idle = true
equipped = true
else
idle = false
equipped = false
end
end
end
ContextActionService:BindAction("PressedFlashLight", FlashLight, true, Enum.KeyCode.F, Enum.KeyCode.ButtonY)
ContextActionService:setTitle("PressedFlashLight", "FlashLight")
ContextActionService:SetPosition("PressedFlashLight", UDim2.new(0.4, 0, 0.9, 0))
ContextActionService:SetImage("PressedFlashLight", "http://www.roblox.com/asset/?id=9657060536")
local Runbutton = ContextActionService:GetButton("PressedFlashLight")
if Runbutton then
Runbutton.ImageColor3 = Color3.fromRGB(255, 247, 0)
end
the viewmodel name is flashviewmodel in ReplicatedStorage
thanks for ur helps!
(i dont know anything about viewmodel scripting)
i just maked the script pure as just cas wil be remain so there is no other things except cas ig can you hep me to add viewmodel script to this i couldnt find any forum orvideo for the same problem so
I need the rigged model not the mesh tho I dont know how u want the thing to be. Since this is for helping and learning Im not able to do the rigging for you. But rigging is easy + the mesh have too many triangles that dont let me upload
uhhh i want when presed f the viewmodel will be cloned to camea and follows it whne pressed f again it will be destroyed but can you help me just clone a light part?