If you know me business, I got enslaved/hired to make a transfur game.
I made a script for her that was working. She touched the script and now it is not triggering at all.
local part = script.Parent
local player = game.Players.LocalPlayer
local function onTouch(touchpart)
script.Parent["Becoming Furry"]:Play()
if touchpart.Parent == player.Character then
print(player.Name.." is becoming "..part.Name)
player.PlayerGui.FurryMeter.FurryValue.Value += 5
end
end
part.Touched:Connect(onTouch)
local part = script.Parent
local player = game.Players.LocalPlayer
local function onTouch(touchpart)
if touchpart.Parent == player.Character then
if game.Players.LocalPlayer.PlayerGui.FurryMeter.FurryValue.Value >= 95 and game.Players.LocalPlayer.PlayerGui.FurryMeter.IsASpecies.Value == "" then
game.Players.LocalPlayer.PlayerGui.FurryMeter.IsASpecies.Value = script.Parent.Name
end
end
end
part.Touched:Connect(onTouch)
Could it be one of the if statements not allowing the touch code to function? Put print functions at key areas and see which stuff passes through. You can also put comparisons within print statements like this: print(5 < 3) —This will print false
It didn’t even play a sound. It could be caused by her changes with goos. After that, she parented the scripts and sound to model. Tried parenting them back to part, but still nothing.
Open a new place, make a part, and then put your script it. Play it, and see if it triggers. If it does, your script is ok, but something else in the game is causing the problem.
Could it be the shape of the object you are standing on?
Maybe your feet aren’t quite touching them?
Or if you are inside of a larger invisible part, that might interfere with touching.
Not sure but I think there used to be an issue, that if a part was inside of another part, it wouldn’t detect touch events.
task.wait(3)
local part = script.Parent
local player = game:GetService("Players").LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local char = player.Character or player.CharacterAdded:Wait()
local furry = playerGui:WaitForChild("FurryMeter"):WaitForChild("FurryValue")
local sound = part:WaitForChild("becomingFurry")
local db = true
function onTouch(touch)
if touch.Parent == char then
if db then db = false sound:Play()
print(player.Name.." is becoming "..part.Name)
furry.Value += 5
task.wait(0.5)
db = true
end
end
end
part.Touched:Connect(onTouch)
task.wait(3)
local part = script.Parent
local player = game:GetService("Players").LocalPlayer
local playerGui = player:WaitForChild("PlayerGui")
local char = player.Character or player.CharacterAdded:Wait()
local meter = playerGui:WaitForChild("FurryMeter")
local furry = meter:WaitForChild("FurryValue")
local species = meter:WaitForChild("IsASpecies")
local db = true
function onTouch(touch)
if touch.Parent == char then
if db then db = false
if furry.Value >= 95 and species.Value == "" then
species.Value = script.Parent.Name
end task.wait(0.33)
db = true
end
end
end
part.Touched:Connect(onTouch)
Easier to work with and debug.
Added pauses and avoiding spaces.