ok so bsically i have a hat give on my game and it was working a month ago but my broter shut down my pc without me saving my progres so i had to remake the giver and now its not working anymore for some weird reason and i havent been scripting much lately so it could be im missing something idk but i doubt it cause im an expert scripter so it probalby is a glitch but i just want to make sure. hers my code
giver = workspace.club.givers.hatgivers.tophat hat = workspace.hats.tophat giver.Touched:Connect(function(hit) clone = hat:Clone() clone.Parent = hit.Head end)
The 'hit' parameter of the 'Touched' function references a touched part, not a model. You are trying to search for the head of a character through that touched part.
On line 7, simply do
clone.Parent = hit.Parent.Head
Put the hat in lighting and try something like this!
giver = workspace.club.givers.hatgivers.tophat Lighting = game:GetService("Lighting") Hat = Lighting.Hat giver.Touched:Connect(function(hit) clone = hat:Clone() clone.Parent = hit.Head end)